Skip to content

Commit

Permalink
feat(add-aggregation-selector-option-to-otlp-metric-exporter)
Browse files Browse the repository at this point in the history
  • Loading branch information
AkselAllas committed Jan 10, 2024
1 parent ae0a3c5 commit 4819ba2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ export class OTLPMetricExporterBase<

constructor(exporter: T, config?: OTLPMetricExporterOptions) {
this._otlpExporter = exporter;
if (config?.aggregationSelector) {
this._otlpExporter.aggregationSelector = config.aggregationSelector

Check failure on line 121 in experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/OTLPMetricExporterBase.ts

View workflow job for this annotation

GitHub Actions / browser-tests

Property 'aggregationSelector' does not exist on type 'T'.

Check failure on line 121 in experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/OTLPMetricExporterBase.ts

View workflow job for this annotation

GitHub Actions / browser-tests

Property 'aggregationSelector' does not exist on type 'T'.

Check failure on line 121 in experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/OTLPMetricExporterBase.ts

View workflow job for this annotation

GitHub Actions / browser-tests

Property 'aggregationSelector' does not exist on type 'T'.

Check failure on line 121 in experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/OTLPMetricExporterBase.ts

View workflow job for this annotation

GitHub Actions / node-tests (14)

Property 'aggregationSelector' does not exist on type 'T'.

Check failure on line 121 in experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/OTLPMetricExporterBase.ts

View workflow job for this annotation

GitHub Actions / node-tests (14)

Property 'aggregationSelector' does not exist on type 'T'.

Check failure on line 121 in experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/OTLPMetricExporterBase.ts

View workflow job for this annotation

GitHub Actions / node-tests (14)

Property 'aggregationSelector' does not exist on type 'T'.

Check failure on line 121 in experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/OTLPMetricExporterBase.ts

View workflow job for this annotation

GitHub Actions / node-tests (16)

Property 'aggregationSelector' does not exist on type 'T'.

Check failure on line 121 in experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/OTLPMetricExporterBase.ts

View workflow job for this annotation

GitHub Actions / node-tests (16)

Property 'aggregationSelector' does not exist on type 'T'.

Check failure on line 121 in experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/OTLPMetricExporterBase.ts

View workflow job for this annotation

GitHub Actions / node-tests (16)

Property 'aggregationSelector' does not exist on type 'T'.

Check failure on line 121 in experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/OTLPMetricExporterBase.ts

View workflow job for this annotation

GitHub Actions / node-windows-tests

Property 'aggregationSelector' does not exist on type 'T'.

Check failure on line 121 in experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/OTLPMetricExporterBase.ts

View workflow job for this annotation

GitHub Actions / node-windows-tests

Property 'aggregationSelector' does not exist on type 'T'.

Check failure on line 121 in experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/OTLPMetricExporterBase.ts

View workflow job for this annotation

GitHub Actions / node-windows-tests

Property 'aggregationSelector' does not exist on type 'T'.

Check failure on line 121 in experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/OTLPMetricExporterBase.ts

View workflow job for this annotation

GitHub Actions / node-tests (18)

Property 'aggregationSelector' does not exist on type 'T'.

Check failure on line 121 in experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/OTLPMetricExporterBase.ts

View workflow job for this annotation

GitHub Actions / node-tests (18)

Property 'aggregationSelector' does not exist on type 'T'.

Check failure on line 121 in experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/OTLPMetricExporterBase.ts

View workflow job for this annotation

GitHub Actions / node-tests (18)

Property 'aggregationSelector' does not exist on type 'T'.

Check failure on line 121 in experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/OTLPMetricExporterBase.ts

View workflow job for this annotation

GitHub Actions / node-tests (20)

Property 'aggregationSelector' does not exist on type 'T'.

Check failure on line 121 in experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/OTLPMetricExporterBase.ts

View workflow job for this annotation

GitHub Actions / node-tests (20)

Property 'aggregationSelector' does not exist on type 'T'.

Check failure on line 121 in experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/OTLPMetricExporterBase.ts

View workflow job for this annotation

GitHub Actions / node-tests (20)

Property 'aggregationSelector' does not exist on type 'T'.

Check failure on line 121 in experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/OTLPMetricExporterBase.ts

View workflow job for this annotation

GitHub Actions / webworker-tests

Property 'aggregationSelector' does not exist on type 'T'.

Check failure on line 121 in experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/OTLPMetricExporterBase.ts

View workflow job for this annotation

GitHub Actions / webworker-tests

Property 'aggregationSelector' does not exist on type 'T'.

Check failure on line 121 in experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/OTLPMetricExporterBase.ts

View workflow job for this annotation

GitHub Actions / webworker-tests

Property 'aggregationSelector' does not exist on type 'T'.
}
this._aggregationTemporalitySelector = chooseTemporalitySelector(
config?.temporalityPreference
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
*/

import { OTLPExporterConfigBase } from '@opentelemetry/otlp-exporter-base';
import { AggregationTemporality } from '@opentelemetry/sdk-metrics';
import { AggregationTemporality, AggregationSelector } from '@opentelemetry/sdk-metrics';

export interface OTLPMetricExporterOptions extends OTLPExporterConfigBase {
temporalityPreference?:
| AggregationTemporalityPreference
| AggregationTemporality;
aggregationSelector? : AggregationSelector
}

export enum AggregationTemporalityPreference {
Expand Down

0 comments on commit 4819ba2

Please sign in to comment.