Skip to content

Commit

Permalink
chore: change property name
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain committed Jan 7, 2025
1 parent 712d139 commit 87923ee
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions packages/interface/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -754,12 +754,12 @@ export interface LoggerOptions {
}

/**
* An object that includes a context object that is passed onwards.
* An object that includes a trace object that is passed onwards.
*
* This is used by metrics method tracing to link function calls together.
*/
export interface ContextOptions {
context?: any
export interface TraceOptions {
trace?: any
}

/**
Expand All @@ -768,7 +768,7 @@ export interface ContextOptions {
* local caches but may not use the network if a valid local value is found,
* these options allow tuning that behaviour.
*/
export interface RoutingOptions extends AbortOptions, ProgressOptions, ContextOptions {
export interface RoutingOptions extends AbortOptions, ProgressOptions, TraceOptions {
/**
* Pass `false` to not use the network
*
Expand Down
2 changes: 1 addition & 1 deletion packages/interface/src/metrics/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ export interface Metrics {
/**
* Creates a tracing context that can be used to trace a method call
*/
createTraceContext(): any
createTrace(): any
}

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/metrics-devtools/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ class DevToolsMetrics implements Metrics, Startable {
return this.simpleMetrics.registerSummaryGroup(name, options)
}

createTraceContext (): any {
return this.simpleMetrics.createTraceContext()
createTrace (): any {
return this.simpleMetrics.createTrace()
}

Check warning on line 244 in packages/metrics-devtools/src/index.ts

View check run for this annotation

Codecov / codecov/patch

packages/metrics-devtools/src/index.ts#L243-L244

Added lines #L243 - L244 were not covered by tests

traceFunction <T extends (...args: any[]) => any> (name: string, fn: T, options?: any): T {
Expand Down
2 changes: 1 addition & 1 deletion packages/metrics-prometheus/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ class PrometheusMetrics implements Metrics {
}
}

createTraceContext (): any {
createTrace (): any {
// no-op
}

Check warning on line 496 in packages/metrics-prometheus/src/index.ts

View check run for this annotation

Codecov / codecov/patch

packages/metrics-prometheus/src/index.ts#L495-L496

Added lines #L495 - L496 were not covered by tests

Expand Down
2 changes: 1 addition & 1 deletion packages/metrics-simple/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ class SimpleMetrics implements Metrics, Startable {
return metric
}

createTraceContext (): any {
createTrace (): any {
// no-op
}

Check warning on line 557 in packages/metrics-simple/src/index.ts

View check run for this annotation

Codecov / codecov/patch

packages/metrics-simple/src/index.ts#L556-L557

Added lines #L556 - L557 were not covered by tests

Expand Down

0 comments on commit 87923ee

Please sign in to comment.