Skip to content

Commit

Permalink
feat(performance): add missing methods (#505)
Browse files Browse the repository at this point in the history
Add since attribute to definitions.
  • Loading branch information
ebarooni committed Dec 8, 2024
1 parent 284d70b commit 96856dc
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions packages/performance/src/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ export interface FirebasePerformancePlugin {
* @since 6.3.0
*/
getMetric(options: GetMetricOptions): Promise<GetMetricResult>;

/**
* Records a trace given its name and options.
*
Expand Down Expand Up @@ -149,6 +148,9 @@ export interface IsEnabledResult {
enabled: boolean;
}

/**
* @since 6.3.0
*/
export interface PutAttributeOptions {
/**
* Name of the trace to set its attribute.
Expand All @@ -170,6 +172,9 @@ export interface PutAttributeOptions {
value: string;
}

/**
* @since 6.3.0
*/
export interface GetAttributeOptions {
/**
* Name of the trace to set its attribute.
Expand All @@ -185,6 +190,9 @@ export interface GetAttributeOptions {
attribute: string;
}

/**
* @since 6.3.0
*/
export interface GetAttributeResult {
/**
* The value of the custom attribute.
Expand All @@ -194,6 +202,9 @@ export interface GetAttributeResult {
value: string | null;
}

/**
* @since 6.3.0
*/
export interface GetAttributesOptions {
/**
* Name of the trace to get its attributes.
Expand All @@ -203,17 +214,26 @@ export interface GetAttributesOptions {
traceName: string;
}

/**
* @since 6.3.0
*/
export interface GetAttributesResult {
/**
* A map of all custom attributes of a trace with their values.
*
* @since 6.3.0
*/
result: { [k: string]: string };
result: { [key: string]: string };
}

/**
* @since 6.3.0
*/
export type RemoveAttributeOptions = GetAttributeOptions;

/**
* @since 6.3.0
*/
export interface PutMetricOptions {
/**
* Name of the trace to set its metric.
Expand All @@ -236,6 +256,9 @@ export interface PutMetricOptions {
num: number;
}

/**
* @since 6.3.0
*/
export interface GetMetricOptions {
/**
* Name of the trace to get its metric.
Expand All @@ -251,6 +274,9 @@ export interface GetMetricOptions {
metricName: string;
}

/**
* @since 6.3.0
*/
export interface GetMetricResult {
/**
* The value of the metric if exists.
Expand All @@ -260,6 +286,9 @@ export interface GetMetricResult {
value: number | null;
}

/**
* @since 6.3.0
*/
export interface RecordOptions {
/**
* Name of the trace to record.
Expand Down

0 comments on commit 96856dc

Please sign in to comment.