Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDK 2.0] merge changes from next to main #5284

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
0f8aa79
Update `next` branch (#4294)
dyladan Nov 15, 2023
e0efd7a
Merge remote-tracking branch 'origin/main' into next-main-11-16
dyladan Nov 16, 2023
ba4de42
Execute binaries from root node modules (#4304)
dyladan Nov 17, 2023
6031bb4
Merge branch 'next' into next-main-11-16
dyladan Nov 17, 2023
ab52a84
[next] deprecate 14,16 and support 20
dyladan Nov 15, 2023
9d62673
Fix prom test for node 20
dyladan Nov 15, 2023
7cf46c7
Name exports to fix ESM tests
dyladan Nov 16, 2023
d229b3a
Temporarily disable node 20
dyladan Nov 17, 2023
343ca78
lint
dyladan Nov 17, 2023
bf30779
Do not export node-specific names
dyladan Nov 20, 2023
4cbb635
Move node module file to root
dyladan Nov 20, 2023
21da78f
Export node module file
dyladan Nov 20, 2023
26fcb88
Merge pull request #4308 from dyladan/next-main-11-16
dyladan Nov 21, 2023
5be08f4
Merge branch 'next' into deprecate-old-runtimes
dyladan Nov 21, 2023
dc10b81
Bump to 18 on other workflows
dyladan Nov 21, 2023
3b8f0af
Merge branch 'deprecate-old-runtimes' of github.com:dyladan/opentelem…
dyladan Nov 21, 2023
543f0b4
Benchmark a tested version
dyladan Nov 22, 2023
35be022
Merge pull request #4295 from dyladan/deprecate-old-runtimes
dyladan Nov 22, 2023
09bdeba
chore: require changelog entries for next branch (#4342)
dyladan Dec 12, 2023
ea8bfa2
`[next]` merge changes from `main` (#4363)
dyladan Dec 13, 2023
ba00147
chore: remove checks for unsupported versions (#4341)
dyladan Dec 13, 2023
fac6d14
[next] remove README and add warning (#4226)
dyladan Jan 15, 2024
7f613e0
chore(otel-core): replace deprecated SpanAttributes (#4408)
JamieDanielson Jan 17, 2024
9727686
chore(shim-opentracing): replace deprecated spanAttributes (#4430)
JamieDanielson Jan 19, 2024
0aba75c
chore(otel-resources): replace deprecated spanAttributes (#4428)
JamieDanielson Jan 22, 2024
a9af247
feat(sdk-metrics)!: remove MeterProvider.addMetricReader() in favor o…
pichlermarc Jan 24, 2024
b7c5382
Merge branch 'main' into next-main-02-09
pichlermarc Feb 9, 2024
19b433e
chore: fix conflicts
pichlermarc Feb 9, 2024
83becc7
Merge pull request #4471 from dynatrace-oss-contrib/next-main-02-09
pichlermarc Feb 12, 2024
12dec9b
Merge branch 'main' into next-main-2024-02-23
pichlermarc Feb 23, 2024
c379326
Merge pull request #4503 from dynatrace-oss-contrib/next-main-2024-02-23
pichlermarc Mar 7, 2024
6804066
[next] merge changes from main
pichlermarc Mar 7, 2024
a30989f
Merge pull request #4531 from dynatrace-oss-contrib/next-main-2024-03-07
pichlermarc Mar 11, 2024
55f15e9
feat(sdk-metrics)!: replace attributeKeys with an option to add custo…
pichlermarc Jun 18, 2024
154155f
Merge branch 'main' into next-main-2024-07-30
pichlermarc Jul 30, 2024
eee78fa
chore: clean up merge
pichlermarc Jul 30, 2024
bb9caaf
Merge pull request #4887 from dynatrace-oss-contrib/next-main-2024-07-30
pichlermarc Jul 31, 2024
00683ff
Merge branch 'main' into next-main-2024-08-21
pichlermarc Aug 21, 2024
f7dccbf
Merge pull request #4934 from dynatrace-oss-contrib/next-main-2024-08-21
pichlermarc Aug 22, 2024
f4d0dcf
Merge branch 'main' into next-main-2024-09-23
pichlermarc Sep 23, 2024
32564ad
[next] merge changes from main
pichlermarc Sep 23, 2024
1804925
Merge pull request #5010 from dynatrace-oss-contrib/next-main-2024-09-23
pichlermarc Sep 23, 2024
e15d5b3
feat(sdk-trace-base): replace SpanAttributes with Attributes (#5009)
david-luna Sep 25, 2024
91c67ba
refactor(resources)!: replace ResourceAttributes with Attributes (#5016)
david-luna Sep 26, 2024
98143af
fix(sdk-trace): make activeSpanProcessor private (#4965)
legalimpurity Sep 27, 2024
8fed1b1
feat(sdk-metrics)!: drop View and Aggregation for options (#4931)
pichlermarc Oct 8, 2024
b057c93
[next] merge changes from main
pichlermarc Oct 8, 2024
cc8c54a
Merge pull request #5052 from dynatrace-oss-contrib/next-main-2024-10-08
pichlermarc Oct 10, 2024
dcc1a87
docs: [Browser] Define the support browser runtimes (#5059)
MSNev Oct 14, 2024
508946c
refactor(sdk-trace-base)!: remove Span class from exports (#5048)
david-luna Oct 21, 2024
4a394cc
Merge branch 'main' into next-main-
pichlermarc Nov 12, 2024
a833d9c
Merge pull request #5144 from dynatrace-oss-contrib/next-main-
pichlermarc Nov 13, 2024
b7343ef
feat(sdk-trace-base)!: remove `addSpanProcessor` API (#5152)
david-luna Nov 14, 2024
f3a6310
refactor(sdk-trace-base): remove `_registeredSpanProcessors` from Bas…
david-luna Nov 21, 2024
c28abac
refactor(sdk-trace-base): make resource private and remove getActiveS…
david-luna Nov 25, 2024
810b618
refactor(sdk-trace-base): rename `activeSpanProcessor` private proper…
david-luna Nov 27, 2024
a8b4cd2
Merge branch 'main' into next-main-2024-12-04
pichlermarc Dec 4, 2024
47212bb
fix: remove accidentally re-added empty files
pichlermarc Dec 4, 2024
eb81e28
Merge pull request #5236 from dynatrace-oss-contrib/next-main-2024-12-04
pichlermarc Dec 5, 2024
6d7a73a
refactor(sdk-metrics) Swap workaround types for @otel/api types (#5254)
chancancode Dec 13, 2024
a8befa6
Merge branch 'main' into next-main-2024-12-16
pichlermarc Dec 16, 2024
4179ddb
Merge branch 'main' into next-main-2024-12-16
pichlermarc Dec 18, 2024
b8d7966
Merge pull request #5275 from dynatrace-oss-contrib/next-main-2024-12-16
pichlermarc Dec 18, 2024
2610521
docs: merge changelog and readme
pichlermarc Dec 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This action requires that any PR targeting the main branch should touch at
# This action requires that any PR targeting the main and next branch should touch at
# least one CHANGELOG file. If a CHANGELOG entry is not required, add the "Skip
# Changelog" label to disable this action.

Expand All @@ -9,6 +9,7 @@ on:
types: [opened, synchronize, reopened, labeled, unlabeled]
branches:
- main
- next
jobs:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eventually we'll be able to drop this change, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - I'll follow up with a PR to clean this up :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we likely could drop it now. The next branch will go away

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pichlermarc when you get around to this, PRs to the v1.x maintenance branch no longer triggers this workflow. As the two branches diverge over time, there would probably be some PRs that needs to target that branch once in a while. I would fix it, but I can never remember whether you are supposed to change the workflow file on main or the one on the branch :)

changelog:
runs-on: ubuntu-latest
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:
fail-fast: false
matrix:
node_version:
- "14"
- "16"
- "18"
- "20"
- "22"
Expand All @@ -34,10 +32,6 @@ jobs:
- run: npm install -g npm@latest
if: ${{ matrix.node_version == '20' || matrix.node_version == '22' }}

# npm@10.0.0 drops support for Node.js v14 and v16
- run: npm install -g npm@"<10.0.0"
if: ${{ matrix.node_version == '14' || matrix.node_version == '16' }}

# npm@11.0.0 drops support for Node.js v18
- run: npm install -g npm@"<11.0.0"
if: ${{ matrix.node_version == '18'}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/w3c-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: '16'
node-version: 18

- name: Install and Bootstrap 🔧
run: npm ci
Expand Down
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,20 @@ For semantic convention package changes, see the [semconv CHANGELOG](packages/se

### :boom: Breaking Change

* feat(sdk-metrics)!: bump minimum version of `@opentelemetry/api` peer dependency to 1.9.0 [#5254](https://github.com/open-telemetry/opentelemetry-js/pull/5254) @chancancode
* chore(shim-opentracing): replace deprecated SpanAttributes [#4430](https://github.com/open-telemetry/opentelemetry-js/pull/4430) @JamieDanielson
* chore(otel-core): replace deprecated SpanAttributes [#4408](https://github.com/open-telemetry/opentelemetry-js/pull/4408) @JamieDanielson
* feat(sdk-metrics)!: remove MeterProvider.addMetricReader() in favor of constructor option [#4419](https://github.com/open-telemetry/opentelemetry-js/pull/4419) @pichlermarc
* chore(otel-resources): replace deprecated SpanAttributes [#4428](https://github.com/open-telemetry/opentelemetry-js/pull/4428) @JamieDanielson
* feat(sdk-metrics)!: remove MeterProvider.addMetricReader() in favor of constructor option [#4419](https://github.com/open-telemetry/opentelemetry-js/pull/4419) @pichlermarc
* feat(sdk-metrics)!: replace attributeKeys with custom processors option [#4532](https://github.com/open-telemetry/opentelemetry-js/pull/4532) @pichlermarc
* refactor(sdk-trace-base)!: replace `SpanAttributes` with `Attributes` [#5009](https://github.com/open-telemetry/opentelemetry-js/pull/5009) @david-luna
* refactor(resources)!: replace `ResourceAttributes` with `Attributes` [#5016](https://github.com/open-telemetry/opentelemetry-js/pull/5016) @david-luna
* feat(sdk-metrics)!: drop `View` and `Aggregation` in favor of `ViewOptions` and `AggregationOption` [#4931](https://github.com/open-telemetry/opentelemetry-js/pull/4931) @pichlermarc
* refactor(sdk-trace-base)!: remove `new Span` constructor in favor of `Tracer.startSpan` API [#5048](https://github.com/open-telemetry/opentelemetry-js/pull/5048) @david-luna
* refactor(sdk-trace-base)!: remove `BasicTracerProvider.addSpanProcessor` API in favor of constructor options. [#5134](https://github.com/open-telemetry/opentelemetry-js/pull/5134) @david-luna
* refactor(sdk-trace-base)!: make `resource` property private in `BasicTracerProvider` and remove `getActiveSpanProcessor` API. [#5192](https://github.com/open-telemetry/opentelemetry-js/pull/5192) @david-luna

Comment on lines +14 to +27
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copied from CHANGELOG_NEXT.md, and then I deleted CHANGELOG_NEXT.md

### :rocket: (Enhancement)

### :bug: (Bug Fix)
Expand All @@ -19,6 +33,11 @@ For semantic convention package changes, see the [semconv CHANGELOG](packages/se

### :house: (Internal)

* refactor(sdk-metrics): remove `Gauge` and `MetricAdvice` workaround types in favor of the upstream `@opentelemetry/api` types [#5254](https://github.com/open-telemetry/opentelemetry-js/pull/5254) @chancancode
* chore: remove checks for unsupported node versions [#4341](https://github.com/open-telemetry/opentelemetry-js/pull/4341) @dyladan
* refactor(sdk-trace-base): remove `BasicTracerProvider._registeredSpanProcessors` private property. [#5134](https://github.com/open-telemetry/opentelemetry-js/pull/5134) @david-luna
* refactor(sdk-trace-base): rename `BasicTracerProvider.activeSpanProcessor` private property. [#5211](https://github.com/open-telemetry/opentelemetry-js/pull/5211) @david-luna
Comment on lines +36 to +39
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copied from CHANGELOG_NEXT.md, and then I deleted CHANGELOG_NEXT.md


## 1.30.0

### :rocket: (Enhancement)
Expand Down Expand Up @@ -69,6 +88,8 @@ For semantic convention package changes, see the [semconv CHANGELOG](packages/se
* `@opentelemetry/propagator-aws-xray` is now located in [open-telemetry/opentelemetry-js-contrib](https://github.com/open-telemetry/opentelemetry-js-contrib)
* `@opentelemetry/propagator-aws-xray-lambda` is now located in [open-telemetry/opentelemetry-js-contrib](https://github.com/open-telemetry/opentelemetry-js-contrib)

* docs: [Browser] Define the supported browser runtimes [Issue #4168](https://github.com/open-telemetry/opentelemetry-js/issues/4168) PR:[#5059](https://github.com/open-telemetry/opentelemetry-js/pull/5059) @MSNev

### :house: (Internal)

* deps: set `@opentelemetry/api` dependency min version to 1.3.0 in `examples`, `experimental/packages`, `integration-tests` and `selenium-tests`
Expand Down
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@

---

> [!WARNING]
> This is the working branch for the work in progress 2.0 SDK, see [this tracking issue](https://github.com/open-telemetry/opentelemetry-js/issues/5148) for details.
maryliag marked this conversation as resolved.
Show resolved Hide resolved
> If you are a user looking for the current released state, you are probably looking for the [1.x SDK](https://github.com/open-telemetry/opentelemetry-js/tree/v1.x) on the v1.x branch.

## About this project

This is the JavaScript version of [OpenTelemetry](https://opentelemetry.io/), a framework for collecting traces, metrics, and logs from applications.
Expand Down Expand Up @@ -135,8 +139,17 @@ Note that versions of Node.JS v8 prior to `v8.12.0` will NOT work, because OpenT
> Client instrumentation for the browser is **experimental** and mostly **unspecified**. If you are interested in
> helping out, get in touch with the [Client Instrumentation SIG][client-instrumentation-sig].

There is currently no list of officially supported browsers. OpenTelemetry is developed using standard web
technologies and aims to work in currently supported versions of major browsers.
Rather than define versions of specific browsers / runtimes, OpenTelemetry sets the minimum supported version based on the
underlying language features used.

The current minumum language feature support is set as [ECMAScript 2020](https://262.ecma-international.org/11.0/) that are available
in all modern browsers / runtimes.

This means that if you are targeting or your end-users are using a browser / runtime that does not support ES2020, you will need
to transpile the code and provide any necessary polyfills for the missing features to ensure compatibility with your target
environments. Any support issues that arise from using a browser or runtime that does not support ES2020 will be closed as "won't fix".

This minimum support level is subject to change as the project evolves and as the underlying language features evolve.

## Package Version Compatibility

Expand Down
2 changes: 1 addition & 1 deletion examples/basic-tracer-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"tracing"
],
"engines": {
"node": ">=14"
"node": ">=18"
},
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
Expand Down
7 changes: 4 additions & 3 deletions examples/esm-http-ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ import { SEMRESATTRS_SERVICE_NAME } from '@opentelemetry/semantic-conventions';
import http from 'http';

diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.DEBUG);
const exporter = new ConsoleSpanExporter();
const processor = new SimpleSpanProcessor(exporter);

const tracerProvider = new NodeTracerProvider({
resource: new Resource({
[SEMRESATTRS_SERVICE_NAME]: 'esm-http-ts-example',
}),
spanProcessors: [processor],
});
const exporter = new ConsoleSpanExporter();
const processor = new SimpleSpanProcessor(exporter);
tracerProvider.addSpanProcessor(processor);
tracerProvider.register();

registerInstrumentations({
Expand Down
2 changes: 1 addition & 1 deletion examples/esm-http-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"typescript"
],
"engines": {
"node": ">=14"
"node": ">=18"
},
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/grpc-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"tracing"
],
"engines": {
"node": ">=14"
"node": ">=18"
},
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"tracing"
],
"engines": {
"node": ">=14"
"node": ">=18"
},
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/https/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"tracing"
],
"engines": {
"node": ">=14"
"node": ">=18"
},
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/opentelemetry-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"web"
],
"engines": {
"node": ">=14"
"node": ">=18"
},
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/opentracing-shim/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"opentracing"
],
"engines": {
"node": ">=14"
"node": ">=18"
},
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/otlp-exporter-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"tracing"
],
"engines": {
"node": ">=14"
"node": ">=18"
},
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion experimental/backwards-compatibility/node14/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=14"
"node": ">=18"
}
}
2 changes: 1 addition & 1 deletion experimental/backwards-compatibility/node16/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=14"
"node": ">=18"
}
}
2 changes: 1 addition & 1 deletion experimental/examples/opencensus-shim/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"opencensus"
],
"engines": {
"node": ">=14"
"node": ">=18"
},
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion experimental/packages/api-events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=14"
"node": ">=18"
},
"files": [
"build/esm/**/*.js",
Expand Down
2 changes: 1 addition & 1 deletion experimental/packages/api-logs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=14"
"node": ">=18"
},
"files": [
"build/esm/**/*.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=14"
"node": ">=18"
},
"files": [
"build/src/**/*.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"url": "https://github.com/open-telemetry/opentelemetry-js/issues"
},
"engines": {
"node": ">=14"
"node": ">=18"
},
"scripts": {
"prepublishOnly": "npm run compile",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=14"
"node": ">=18"
},
"files": [
"build/esm/**/*.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=14"
"node": ">=18"
},
"files": [
"build/src/**/*.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=14"
"node": ">=18"
},
"files": [
"build/esm/**/*.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=14"
"node": ">=18"
},
"files": [
"build/esm/**/*.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=14"
"node": ">=18"
},
"files": [
"build/esm/**/*.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=14"
"node": ">=18"
},
"files": [
"build/src/**/*.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": ">=14"
"node": ">=18"
},
"files": [
"build/esm/**/*.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ import {
InstrumentType,
PushMetricExporter,
ResourceMetrics,
Aggregation,
AggregationSelector,
AggregationOption,
AggregationType,
} from '@opentelemetry/sdk-metrics';
import {
AggregationTemporalityPreference,
Expand Down Expand Up @@ -116,7 +117,11 @@ function chooseAggregationSelector(
if (config?.aggregationPreference) {
return config.aggregationPreference;
} else {
return (_instrumentType: any) => Aggregation.Default();
return (_instrumentType: any) => {
return {
type: AggregationType.DEFAULT,
};
};
}
}

Expand All @@ -138,7 +143,7 @@ export class OTLPMetricExporterBase
);
}

selectAggregation(instrumentType: InstrumentType): Aggregation {
selectAggregation(instrumentType: InstrumentType): AggregationOption {
return this._aggregationSelector(instrumentType);
}

Expand Down
Loading
Loading