Compare commits

..

989 Commits

Author SHA1 Message Date
Svetlana Brennan 48538b46ad
chore(sdk-logs): refactored imports (#5801) 2025-07-23 15:32:40 +00:00
Hector Hernandez 8de88737ff
Fix broken relative paths (#5806) 2025-07-22 14:49:07 +00:00
Kurt King d63dfaef09
fix: broken sdk-metrics and auto-instrumentations-node links in node-sdk README (#5796)
Signed-off-by: Kurt King <kurtaking@gmail.com>
2025-07-18 20:15:16 +00:00
rads-1996 cb42f7d511
Added logic for Url redaction (#5743) 2025-07-14 20:07:17 +00:00
OpenTelemetry Bot 99dde7786f
chore: prepare next release (#5795) 2025-07-10 21:00:31 +00:00
Trent Mick 287d46353d
docs(semantic-conventions): correct placement of semconv 1.36.0 changes in changelog (#5794) 2025-07-10 20:43:00 +00:00
OpenTelemetry Bot 8e1fc80d1a
chore: prepare next release (#5793) 2025-07-10 19:04:30 +00:00
OpenTelemetry Bot 1537d405fe
chore: prepare next release (#5793) 2025-07-10 19:04:30 +00:00
Trent Mick 06330cebbb
feat(semantic-conventions): update semantic conventions to v1.36.0 (#5779) 2025-07-10 18:35:35 +00:00
Trent Mick 41ba7f57cb
feat(semantic-conventions): improve the jsdoc comment on exported constants for enum values (#5784) 2025-07-10 08:01:07 +00:00
OpenTelemetry Bot a0618ad0c7
Sort contributor listings and remove affiliation from emeriti (#5790)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
2025-07-10 08:00:37 +00:00
Trask Stalnaker 2c7037662c
Ensure correct CodeQL workflow permissions (#5791)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
2025-07-10 07:46:15 +00:00
OpenTelemetry Bot 93187f0224
chore: prepare next release (#5788) 2025-07-09 13:18:02 +00:00
Marc Pichler ca6ae61783
chore: sync package-lock.json (#5782) 2025-07-09 12:36:56 +00:00
Marc Pichler 407c98a09f
refactor(otlp-exporter-base): remove pre-Node.js 14 compatibility code (#5787) 2025-07-09 12:36:21 +00:00
Marc Pichler 27d5171890
ci: add write permissions for secuity events (#5786) 2025-07-09 11:47:52 +00:00
OpenTelemetry Bot 7a32f86055
Add minimum token permissions for all github workflow files (#5771)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2025-07-08 09:34:26 +00:00
sceee 5c4057bb8d
fix(docs): fix minimum ECMAScript language support in Readme to ES2022 (#5774)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2025-07-07 08:45:46 +00:00
Godfrey Chan 553db87117
refactor(sdk-node): fix eslint warning (#5400)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2025-07-04 17:04:20 +00:00
Marc Pichler 74d434eecd
ci: remove unused label-releases workflow (#5772) 2025-07-02 07:29:26 +00:00
Trask Stalnaker a59d707c42
Standardize contributing section (#5767) 2025-06-30 07:42:12 +00:00
Svetlana Brennan 491ed96aca
feat(sdk-logs)!: Removed deprecated `LoggerProvider#addLogRecordProcessor()` (#5764) 2025-06-30 07:41:53 +00:00
OpenTelemetry Bot e18a6c8456
Fix outdated community membership link (#5766)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
2025-06-27 08:43:04 +00:00
Trent Mick 8505a6147e
fix(sdk-metrics): remove invalid default value for 'startTime' param to ExponentialHistogramAccumulation (#5763) 2025-06-25 17:02:01 +00:00
OpenTelemetry Bot 04a8150d37
Update community member listings (#5761)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
2025-06-25 07:55:00 +00:00
Svetlana Brennan ec17ce48d0
feat(sdk-logs)!: Changed `LogRecord` to be an interface (#5749)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2025-06-17 18:37:57 +00:00
Siim Kallas f2cfd1327a
feat(api): improve isValidSpanId, isValidTraceId performance (#5714)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2025-06-13 12:48:31 +00:00
Zirak 62fbfd3d0d
docs(exporter-logs-otlp-proto): Fixup markdown table (#5740)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
Co-authored-by: Raphaël Thériault <113933910+raphael-theriault-swi@users.noreply.github.com>
2025-06-13 08:14:51 +00:00
OpenTelemetry Bot 995d708729
Use more specific self-hosted runner name (#5747)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2025-06-12 02:21:16 +00:00
Svetlana Brennan 86bab66f32
refactor!: Removed `api-events` and `sdk-events` (#5737) 2025-06-11 21:54:58 +00:00
Svetlana Brennan 5b3c6b4e83
chore: Regenerated certs (#5752) 2025-06-11 21:10:53 +00:00
Marc Pichler a4e9645829
deps: update to sinon@18.0.1 (#5742) 2025-06-06 14:47:18 +00:00
yoshi-taka 7e30af4c15
fix typo (#5745)
Co-authored-by: Marylia Gutierrez <maryliag@gmail.com>
2025-06-05 16:07:23 +00:00
Logan Rosen 3578f68c74
chore: upgrade to typescript-eslint v8 (#5478)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2025-06-04 09:45:10 +00:00
Daniel Dyla 56df3c0346
feat: add event name to event API and SDK (#5707)
Co-authored-by: Marc Pichler <marcpi@edu.aau.at>
2025-06-02 17:37:06 +00:00
OpenTelemetry Bot 55f8c20b19
chore: prepare next release (#5713) 2025-06-02 14:54:37 +00:00
Marc Pichler c04536857e
chore: move @naseemkullah to emeritus (#5708) 2025-06-02 14:54:11 +00:00
Daniel Dyla b1dc46473c
Improve e2e stability (#5715) 2025-06-02 12:31:39 +00:00
Trent Mick 22bc5bac9b
docs: fix typo in 'http/dup' value to use with OTEL_SEMCONV_STABILITY_OPT_IN envvar (#5725) 2025-05-30 23:14:55 +00:00
Daniel Dyla 5736c49842
feat: update proto to 1.7.0 (#5643)
Co-authored-by: Marc Pichler <marcpi@edu.aau.at>
2025-05-28 15:01:55 +00:00
Colin Ihrig c1935022c1
fix(instrumentation): remove dependency on the shimmer module (#5652) 2025-05-28 10:38:03 +00:00
YangJH 4919fd1711
feat(exporter-metrics-otlp-proto): Support to protobuf in browser metrics (#5710) 2025-05-27 08:59:33 +00:00
Marc Pichler a9fc600f2b
chore(deps): update to msw@2.8.4 (#5709) 2025-05-23 17:53:44 +00:00
renovate[bot] 08afa47f6a
chore(deps): update dependency webpack to v5.99.9 (#5704)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-22 15:10:01 +00:00
OpenTelemetry Bot a2e0f2c6ac
chore: prepare next release (#5705) 2025-05-21 20:20:17 +00:00
Trent Mick 019cb2c149
feat(semantic-conventions): update semantic conventions to v1.34.0 (#5703) 2025-05-21 17:41:15 +00:00
Chengzhong Wu 7a9b04904c
chore: enable tsconfig isolatedModules (#5697) 2025-05-21 08:10:51 +00:00
OpenTelemetry Bot 6d0d33b3df
chore: prepare next release (#5700) 2025-05-20 21:31:59 +00:00
Trent Mick 280cd5012b
test(instrumentation-fetch): pin msw dep to avoid breakage in msw@2.8 (#5702) 2025-05-20 20:59:09 +00:00
Trent Mick 1c8ec3b291
fix(semantic-conventions): Remove the subset of `DB_SYSTEM_NAME_VALUE_*` exports that are unstable from the `@opentelemetry/semantic-conventions` entry point. (#5690) 2025-05-20 15:59:50 +00:00
Łukasz Jernaś 85f1bcc256
chore(opentelemetry-instrumentation-http): Fix link to docs (#5699)
Signed-off-by: Łukasz Jernaś <lukasz.jernas@allegro.com>
2025-05-20 14:52:06 +00:00
renovate[bot] f0ba942c04
chore(deps): update dependency @babel/core to v7.27.1 (#5698)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-20 07:29:26 +00:00
renovate[bot] af9c024c04
chore(deps): update all patch versions (#5694)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-19 16:49:18 +00:00
OpenTelemetry Bot 9dbd1e446b
chore: prepare next release (#5696) 2025-05-19 09:14:41 +00:00
Trent Mick 4e2703c3e0
fix(instrumentation): change `SemconvStability` export from `const enum` to `enum` (#5692) 2025-05-16 21:00:10 +00:00
Trent Mick 072d8a8b2b
refactor(semantic-conventions): use weaver 'file_name' template config (#5689) 2025-05-15 21:39:24 +00:00
Trent Mick 04545fa4ab
refactor(semantic-conventions): tweak the leading spacing of comments on enum values (#5688) 2025-05-15 18:34:37 +00:00
Trent Mick baec0a3e65
refactor(semantic-conventions): weaver 0.13.0 supports a 'stable_only' arg to semconv_attributes (#5687) 2025-05-15 18:12:12 +00:00
Marc Pichler 4ce5bd1651
chore: prepare release 2.0.1/0.201.0 (#5683) 2025-05-15 17:59:44 +00:00
renovate[bot] 6803723f69
fix(deps): update all patch versions (#5685)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-15 12:33:08 +00:00
Trent Mick d4d373217a
feat(instrumentation): export generic 'semconvStabilityFromStr()' utility, rather than namespace-specific ones (#5684) 2025-05-14 23:30:07 +00:00
Colin Ihrig 56610a0c6f
test: test Node.js 24 in CI (#5661)
Co-authored-by: Chengzhong Wu <legendecas@gmail.com>
2025-05-14 13:47:42 +00:00
Jamie Danielson 697e1d31bd
refactor(instrumentation-http): Add back support for http semconv (#5665)
Co-authored-by: Trent Mick <trentm@gmail.com>
2025-05-12 20:18:25 +00:00
Marc Pichler 373edd9bc1
Revert "fix(sdk-metrics): improve PeriodicExportingMetricReader() constructor input validation (#5621)" (#5671) 2025-05-12 14:14:27 +00:00
Trent Mick 0c21db4621
feat(instrumentation-xml-http-request): support migration to stable HTTP semconv, v1.23.1 (#5662) 2025-05-09 22:20:47 +00:00
Trent Mick 0665c854c8
refactor(sdk-node): update semconv usage to ATTR_ exports (#5668) 2025-05-09 20:39:16 +00:00
Trent Mick d07d630cea
refactor(sdk-trace-base): update semconv usage to ATTR_ exports (#5669) 2025-05-09 20:39:15 +00:00
Trent Mick bc8c94e22c
refactor(sdk-trace-node): update semconv usage to ATTR_ exports (#5670) 2025-05-09 19:29:53 +00:00
Trent Mick 4d3f899532
refactor(sdk-trace-web): update semconv usage to ATTR_ exports (#5672) 2025-05-09 19:29:44 +00:00
Trent Mick 6f72fb9646
refactor(exporter-zipkin): update semconv usage to ATTR_ exports (#5673) 2025-05-09 19:29:24 +00:00
Trent Mick ba50c08e12
refactor(shim-opentracing): update semconv usage to ATTR_ exports (#5674) 2025-05-09 19:29:14 +00:00
Trent Mick c2c9399740
refactor(exporter-prometheus): update semconv usage to ATTR_ exports (#5675) 2025-05-09 19:29:06 +00:00
Trent Mick b50f088f8a
refactor(exporter-jaeger): update semconv usage to ATTR_ exports (#5676) 2025-05-09 19:28:54 +00:00
Trent Mick 039b6b4df1
docs: update old/deprecated 'SemanticAttributes' usage (#5664) 2025-05-09 16:42:09 +00:00
Trent Mick b76281a32c
refactor(resources): update semconv usage to ATTR_ exports (#5666) 2025-05-09 16:40:04 +00:00
Colin Ihrig 6033e66530
chore: add missing reference to changelog (#5660)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2025-05-09 16:39:35 +00:00
Trent Mick 5954fdeb90
feat(instrumentation-fetch): support migration to stable HTTP semconv, v1.23.1 (#5651) 2025-05-08 22:09:16 +00:00
Jamie Danielson e1ec4026ed
feat(instrumentation-grpc): support migration to stable HTTP semconv (#5653) 2025-05-08 21:20:13 +00:00
Trent Mick eb4ce206b7
feat(instrumentation): New utilities for semconv stability migration for instrumentations that produce 'http' and 'db' telemetry. (#5659)
Co-authored-by: Jamie Danielson <jamiedanielson@honeycomb.io>
2025-05-08 13:42:30 +00:00
OpenTelemetry Bot 67ba9e3084
chore: prepare next release (#5655)
Co-authored-by: Trent Mick <trentm@gmail.com>
2025-05-07 17:45:28 +00:00
Marc Pichler db0616fb37
chore: temporarily disable github link checking (#5656) 2025-05-07 16:29:26 +00:00
Trent Mick eeec126479
feat(semantic-conventions): update semantic conventions to v1.33.0 (#5654) 2025-05-07 15:40:37 +00:00
Marc Pichler 60d3115390
chore: add @JacksonWeber to triagers (#5641) 2025-05-05 09:16:54 +00:00
Colin Ihrig b0e4e4f1d8
refactor(opentelemetry-core): simplify `parseKeyPairsIntoRecord()` (#5610) 2025-04-30 11:21:06 +00:00
Jackson Weber 7749d0a011
feat:(instrumentation-http) Capture Synthetic Source Type on Requests (#5488)
Co-authored-by: Trent Mick <trentm@gmail.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2025-04-28 16:09:18 +00:00
Aaron Stone aca743b499
[docs] Upgrade note with Jest version requirements and workaround for older versions of Jest (#5619)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2025-04-28 12:19:55 +00:00
Mend Renovate cfc33f7741
chore(deps): lock file maintenance (#5638) 2025-04-28 12:19:04 +00:00
Mend Renovate 0c452201aa
chore(deps): update dependency @bufbuild/buf to v1.53.0 (#5637) 2025-04-28 11:39:16 +00:00
Marc Pichler 2ac15af496
chore: add constraint for renovate to use npm@>10.8.0 (#5632) 2025-04-28 11:36:22 +00:00
Julian Tescher 826c2d90d4
fix(instrumentation-http): stable client metrics response code (#5625)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2025-04-28 11:36:07 +00:00
Mend Renovate 4061f81de7
chore(deps): update dependency webpack to v5.99.7 (#5635) 2025-04-28 10:55:46 +00:00
Marc Pichler a2fab71bae
fix(sdk-node): instantiate baggage processor when env var is set (#5634) 2025-04-28 10:15:26 +00:00
Mend Renovate 6f753cca7e
chore(deps): lock file maintenance (#5630) 2025-04-24 16:36:22 +00:00
Marc Pichler 0b5736d4e1
deps(instrumentation): remove unused @types/semver dev-dependency (#5631) 2025-04-24 14:21:43 +00:00
Mend Renovate 0bbb966729
fix(deps): update all patch versions (#5609) 2025-04-23 15:40:08 +00:00
Jackson Weber 9f5ae79b1e
Fix sdk.start() as Not Async (#5617) 2025-04-23 08:11:03 +00:00
Svetlana Brennan 8efceed28c
feat(instrumentation-http)!: Remove legacy http span attributes and metrics (#5552)
Co-authored-by: Trent Mick <trentm@gmail.com>
2025-04-22 17:01:41 +00:00
Colin Ihrig dbbd03233e
fix(sdk-metrics): improve PeriodicExportingMetricReader() constructor input validation (#5621) 2025-04-22 12:33:13 +00:00
miguel11nines fb2fdd293f
[core] migrate away from deprecated constants in sdk-info.ts (#5593)
Co-authored-by: Trent Mick <trentm@gmail.com>
2025-04-16 18:45:44 +00:00
Colin Ihrig cf6dffeebc
refactor: replace assertRejects() with assert.rejects() (#5614) 2025-04-15 16:03:07 +00:00
Antoine du Hamel de3a89b1f6
fix(docs): remove WIP warning on the README (#5606)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2025-04-15 15:11:07 +00:00
Marc Pichler e26ecd8eda
docs: fix api doc links (#5613) 2025-04-15 15:04:24 +00:00
Colin Ihrig c89cb38d0f
test(sdk-metrics): fix multiple problematic assertRejects() calls (#5611) 2025-04-14 09:32:53 +00:00
Marc Pichler 37fe1e495b
fix(otlp-transformer): do not throw when deserializing empty JSON response (#5551) 2025-04-14 08:13:32 +00:00
ZHAO Jin-Xiang 6e15d69cb8
fix(resource): use dynamic import over require to improve ESM compliance (#5298)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2025-04-14 08:00:58 +00:00
OpenTelemetry Bot dac72912b3
chore: prepare next release (#5607) 2025-04-10 16:39:19 +00:00
Trent Mick b0b721ae3e
feat(semantic-conventions): update semantic conventions to v1.32.0 (#5603) 2025-04-10 16:16:21 +00:00
Mend Renovate a59448fe27
chore(deps): lock file maintenance (#5566) 2025-04-10 12:23:51 +00:00
Trent Mick 4f9b31b78a
docs: update from deprecated SEMRESATTRS_SERVICE_NAME to ATTR_SERVICE_NAME (#5604) 2025-04-10 07:35:26 +00:00
Mend Renovate 28ddef3868
chore(deps): update dependency node to v22 (#5554)
Co-authored-by: Trent Mick <trentm@gmail.com>
2025-04-09 21:03:45 +00:00
Michael Beemer 78f9260bd5
refactor(sdk-node): update node sdk to use env var util (#5582)
Signed-off-by: Michael Beemer <michael.beemer@dynatrace.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
Co-authored-by: Trent Mick <trentm@gmail.com>
2025-04-09 20:28:59 +00:00
Sebastian Bejga e46bd39e8d
refactor(opentelemetry-sdk-node): use new get*FromEnv() function in NodeSDK's metrics setup (#5578)
Co-authored-by: Trent Mick <trentm@gmail.com>
2025-04-09 20:07:39 +00:00
OpenTelemetry Bot 141c054d2d
chore: prepare next release (#5549) 2025-04-09 19:51:10 +00:00
Trent Mick 58468728e8
feat(semantic-conventions): update semantic conventions to v1.31.0 (#5589) 2025-04-09 19:33:18 +00:00
Asstra 0f6619e0cc
refactor(instrumentation): change tests to allow use of mocha context (#5591)
Signed-off-by: Adrien Raimbault <adrien.raimbault@etu.umontpellier.fr>
2025-04-09 13:10:27 +00:00
David Luna b018f15a00
test(instr-http): add test for removing auth in http.url and url.full semantic attributes (#5592) 2025-04-09 13:09:29 +00:00
Matéo Fernandez 0808373465
feat(@opentelemetry/sdk-logs): align LoggerProvider constructor options with Trace and Metrics SDK (#5588)
Signed-off-by: Matéo Fernandez <mateo.fernandez73@gmail.com>
2025-04-09 13:06:39 +00:00
Mend Renovate 54e039c9e0
fix(deps): update dependency body-parser to v2 (#5597) 2025-04-09 13:03:31 +00:00
Mend Renovate 77cad06f40
chore(deps): update github/codeql-action action to v3.28.15 (#5599) 2025-04-09 13:02:45 +00:00
Asstra 3c452f4b20
fix(examples): use correct node tracer provider function (#5586)
Signed-off-by: Adrien Raimbault <adrien.raimbault@etu.umontpellier.fr>
2025-04-02 21:22:58 +00:00
Ole Kristian Pedersen efc640eefa
test(@opentelemetry/sdk-trace-node): refactor tests to allow use of mocha context (#5587) 2025-04-02 17:31:06 +00:00
Alexandre Gomez 2c60ac030a
refactor(resources): replace deprecated semconv consts (#5581)
Signed-off-by: Alexandre Gomez <gomez.a.corneille@gmail.com>
Co-authored-by: Trent Mick <trentm@gmail.com>
2025-04-02 17:29:09 +00:00
Ole Kristian Pedersen dd4b39c850
test(@opentelemetry/api): refactor tests to allow use of mocha context (#5584) 2025-04-02 17:27:38 +00:00
Ole Kristian Pedersen 050aafbea5
test(@opentelemetry/sdk-trace-web): refactor tests to allow use of mocha context (#5585) 2025-04-02 17:26:02 +00:00
Weyert de Boer 27eb7f12cf
refactor: use get*FromEnv() for logging setup (#5580)
Signed-off-by: Weyert de Boer <wdb@innerfuse.biz>
Co-authored-by: Trent Mick <trentm@gmail.com>
2025-04-02 16:53:09 +00:00
Ole Kristian Pedersen a8583b82d3
fix(exporter-oltp-metrics-*): Remove forceFlush (#5579) 2025-04-02 16:43:17 +00:00
Mend Renovate 390243e308
chore(deps): update github/codeql-action action to v3.28.13 (#5568) 2025-04-02 13:06:39 +00:00
OpenTelemetry Bot c3260a4dba
Add ossf-scorecard scanning workflow (#5567)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
2025-04-01 01:19:22 +00:00
Martin Holman b322a24b4a
fix: npm links (#5553) 2025-03-24 12:45:28 +00:00
Mend Renovate c6ab2ba488
fix(deps): update all patch versions (#5530) 2025-03-20 08:47:42 +00:00
Daniel Dyla 790dbb986c
Guard async attributes (#5544)
Co-authored-by: Trent Mick <trentm@gmail.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2025-03-19 17:07:18 +00:00
Daniel Dyla 378344a740
Do not log detected resource (#5546) 2025-03-19 09:02:34 +00:00
Marc Pichler 019671e140
docs: clarify that Resource is not user-implementable (#5541) 2025-03-19 08:29:47 +00:00
Wei Zhu 0590a5c08a
docs: use ATTR_SERVICE_NAME in readme (#5542)
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
2025-03-18 23:16:32 +00:00
Marc Pichler f4dd2a1062
docs: update compatibility matrix (#5536) 2025-03-18 15:19:47 +00:00
Marc Pichler 7fde94081e
chore: prepare release 2.0.0/0.200.0 (#5521) 2025-03-17 15:40:53 +00:00
Trent Mick ecd67debdb
doc: add section to SDK 2.x migration guide for implementors of resource detectors (#5535) 2025-03-14 13:29:52 +00:00
Marc Pichler eaebf765d8
chore: prepare release 2.0.0-rc.1/0.200.0-rc.1 (#5534) 2025-03-12 15:16:07 +00:00
Mend Renovate e947bd93ae
chore(deps): update dependency babel-loader to v10 (#5518) 2025-03-10 12:49:37 +00:00
Mend Renovate 5e20647ffe
fix(deps): update dependency axios to v1.8.2 [security] (#5532) 2025-03-10 12:48:55 +00:00
Mend Renovate 78fc472c17
chore(deps): lock file maintenance (#5531) 2025-03-10 12:23:33 +00:00
Sriraam A S 693b09d9ac
fix(core): avoid using util in configuration.ts for browser compatibility (#5524)
Co-authored-by: Trent Mick <trentm@gmail.com>
2025-03-07 18:30:53 +00:00
Marc Pichler 92fde6aa77
chore: prepare 2.0.0-dev.1/0.200.0-dev.1 pre-release (#5512) 2025-03-05 16:50:06 +00:00
Trent Mick 04b32102f0
doc: upgrade/migration guide for SDK 2.0 (#5513)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
Co-authored-by: Jamie Danielson <jamiedanielson@honeycomb.io>
2025-03-05 07:00:44 +00:00
Mend Renovate cb4826635a
fix(deps): update dependency import-in-the-middle to v1.13.1 (#5517) 2025-03-03 09:52:04 +00:00
Mend Renovate 8e5049877a
chore(deps): update all patch versions (#5510) 2025-02-26 17:53:15 +00:00
Marc Pichler d240d37ec4
feat(core)!: drop unused constants (#5504) 2025-02-25 10:06:23 +00:00
Marc Pichler 455a352b6a
fix(sdk-trace-base)!: use parent-base-always-on on incorrect input (#5494) 2025-02-25 09:29:38 +00:00
Mend Renovate d9eae58155
chore(deps): lock file maintenance (#5508) 2025-02-24 18:32:31 +00:00
Marc Pichler 544c409847
feat(sdk-trace-base)!: remove BasicTracerProvider#register() to improve tree-shaking (#5503) 2025-02-24 16:27:52 +00:00
Mend Renovate 537eaf9fc0
fix(deps): update all patch versions (#5440) 2025-02-24 16:09:41 +00:00
Mend Renovate 7d6e11e02f
chore(deps): update dependency webpack-cli to v6 (#5502) 2025-02-24 08:51:26 +00:00
Marc Pichler 2053f0d3a4
chore: prepare 2.0.0-dev.0/0.200.0-dev.0 release (#5498) 2025-02-21 12:04:54 +00:00
Marc Pichler de5f1dab8c
ci: add `canary` dist-tag when publishing from main (#5496) 2025-02-21 09:22:47 +00:00
David Luna f2d4e54975
feat!: set compilation target to `es2022` for all packages but api and semantic-conventions (#5456)
Co-authored-by: Trent Mick <trentm@gmail.com>
2025-02-21 08:16:15 +00:00
Marc Pichler 492ed355cb
deps: clean up dependencies (#5484) 2025-02-19 11:14:29 +00:00
Marc Pichler 5ccf3809b9
feat(resources): use functions over constants for default and empty resources (#5467) 2025-02-19 11:11:36 +00:00
Marc Pichler faeae98653
feat(core): drop getEnv(), getEnvWithoutDefaults() (#5481) 2025-02-19 11:11:25 +00:00
Marc Pichler d004d41b5a
docs(sdk-metrics): align documentation with current state (#5485) 2025-02-19 11:11:16 +00:00
Marc Pichler 0cdf9eea80
docs(resources): align documentation with current state (#5486) 2025-02-19 11:11:08 +00:00
Jackson Weber 1afa8ba514
feat(sdk-trace-base)!: Add parentSpanContext and remove parentSpanId (#5450)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2025-02-18 17:08:25 +00:00
OpenTelemetry Bot 14d55d8641
Add FOSSA scanning workflow (#5482)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
2025-02-18 12:42:03 +00:00
Logan Rosen e9d3c71918
docs: update Contributing Guide (#5479) 2025-02-17 11:28:31 +00:00
Marc Pichler e4381fcb18
feat(sdk-trace-base)!: do not read environment variables from window (#5455)
Co-authored-by: Trent Mick <trentm@gmail.com>
2025-02-17 11:19:51 +00:00
Marc Pichler 1a5b57b7f3
feat(exporter-metrics-otlp-http)!: do not read environment variables from window (#5473)
Co-authored-by: David Luna <david.luna@elastic.co>
2025-02-17 10:19:49 +00:00
Marc Pichler cc7aa3c724
feat(exporter-zipkin)!: do not read environment variables from window (#5465) 2025-02-17 10:11:43 +00:00
Marc Pichler 52d033171a
refactor(instrumentation-http): migrate away from getEnv() (#5469) 2025-02-17 10:10:38 +00:00
Marc Pichler 5c90aec9af
feat(sdk-logs)!: do not read environment variables from window (#5472) 2025-02-17 09:57:22 +00:00
Marc Pichler 5b988c892d
feat: migrate sdk-node away from getEnv(), introduce diagLogLevelFromString() util (#5475)
Co-authored-by: Trent Mick <trentm@gmail.com>
2025-02-17 09:49:21 +00:00
Godfrey Chan c27fbc6d49
refactor(context-zone-peer-dep): fix eslint warnings (#5371) 2025-02-13 19:33:33 +00:00
Marius Müller 7a1e1b274f
feat(exporter-prometheus): add additional attributes option (#5317)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2025-02-13 18:57:50 +00:00
Marc Pichler 60f2ce9b73
feat(resources)!: do not read environment variables from window (#5466) 2025-02-13 17:24:19 +00:00
Marylia Gutierrez 3c65b56d6f
chore: fix repo parameter (#5468) 2025-02-13 17:05:56 +00:00
Marc Pichler b526ec99d7
refactor(exporter-jaeger): migrate away from getEnv() (#5464) 2025-02-13 16:00:20 +00:00
Daniel Dyla 4b8ae0c2bf
feat(resource)!: Remove resource class export in favor of functions and types only to aid in cross-version compatibility (#5421)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2025-02-13 11:12:44 +00:00
Patrick Lafrance 7438735af7
feat(opentelemetry-instrumentation-fetch): added a requestHook option (#5380)
Signed-off-by: patricklafrance <pa.lafrance@gmail.com>
2025-02-13 09:31:47 +00:00
Daniel Dyla 2d5671aeec
Remove duplicate browser detector (#5420)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2025-02-13 08:43:15 +00:00
Marylia Gutierrez e7865c67d8
chore: add workflow for surveys of non-members (#5411) 2025-02-12 17:06:07 +00:00
Roshini Prasad bc6c4ebb7f
docs(opentelemetry-readme): Updated circleci badge with github action badge (#5457) 2025-02-12 16:39:43 +00:00
Anuraag (Rag) Agrawal afcc71158b
fix(sdk-trace-base): always wait on pending export in SimpleSpanProcessor (#5303) 2025-02-12 13:10:22 +00:00
Trent Mick fcd96deb78
chore: add 'lint:semconv-deps' (#5451) 2025-02-12 11:08:15 +00:00
Marc Pichler 1ed613c248
feat(core): add more scalable replacements for getEnv(), getEnvWithoutDefaults() (#5443) 2025-02-12 10:24:01 +00:00
OpenTelemetry Bot 9feaee3ff5
chore: prepare next release (#5452) 2025-02-12 00:34:58 +00:00
Trent Mick b6fa2b9e4d
feat(semantic-conventions): update semantic conventions to v1.30.0 (#5433) 2025-02-11 23:53:38 +00:00
Marc Pichler 4fb9c5aba9
refactor(web-common): add incubating semconv to package (#5446) 2025-02-11 13:53:04 +00:00
Trent Mick 4f91c1d590
doc: list all current javascript-contrib-triagers members (#5430) 2025-02-11 13:00:16 +00:00
Trent Mick 824814f783
chore: unpin semantic-conventions package dep (#5439) 2025-02-11 12:22:27 +00:00
Trent Mick abf31e17f8
chore: tweak the section titles for changelogs (#5432) 2025-02-11 10:52:14 +00:00
Marc Pichler 94059f7cf7
feat(core)!: remove unused/obsolete functions and types (#5444) 2025-02-11 09:18:58 +00:00
Mend Renovate 99091be9d4
chore(deps): update dependency babel-loader to v9 (#5441) 2025-02-10 08:40:23 +00:00
Trent Mick 3b65dee7bd
chore: temporarily disable API docs updates while main is frozen for releases (#5436) 2025-02-10 08:38:25 +00:00
Marc Pichler b9d5aeeb22
docs(api): bring back detailed api documentation (#5434) 2025-02-07 18:53:58 +00:00
Godfrey Chan e744798957
refactor(instrumentation-xhr): fix eslint warnings (#5402) 2025-02-06 23:43:34 +00:00
OpenTelemetry Bot 6508845fa6
chore: prepare next release (#5431) 2025-02-06 20:40:30 +00:00
Trent Mick 9030b3e7bd
doc(semantic-conventions): add generated changelog details for the previously released v1.28.0 (#5428) 2025-02-06 20:13:58 +00:00
Trent Mick a6bb7a321d
chore(semantic-conventions): whitespace-only fixes in comments from weaver 0.12.0 (#5427) 2025-02-06 17:36:32 +00:00
Godfrey Chan 4001f626d9
refactor(resources): fix eslint warning (#5383) 2025-02-06 10:50:43 +00:00
Mend Renovate 41beed70a3
chore(deps): lock file maintenance (#5414) 2025-02-06 10:48:46 +00:00
Jamie Danielson e9f84cbeef
fix(exporter-logs/trace-otlp-grpc): fix error for missing dependency otlp-exporter-base (#5412) 2025-02-06 10:31:10 +00:00
Trent Mick 241c046ccd
chore: remove obsolete comment (#5426) 2025-02-06 10:23:06 +00:00
Trent Mick 2d4e1cac7c
feat(semantic-conventions): update semantic conventions to v1.29.0 (#5356)
Co-authored-by: Jamie Danielson <jamiedanielson@honeycomb.io>
2025-02-06 01:14:00 +00:00
Trent Mick d803022ba3
docs: add 'Contrib Triagers' section to the README (#5425) 2025-02-05 23:28:44 +00:00
Godfrey Chan 57f37eeb31
refactor(sdk-trace-base): fix eslint warnings (#5385) 2025-02-05 23:28:19 +00:00
Richard Gibson e25de957f4
docs: Fix Markdown typo (#5417) 2025-02-05 20:33:53 +00:00
Trent Mick 34a2dd574c
test: Test Node.js 23 in CI (#5416) 2025-02-05 20:04:04 +00:00
Godfrey Chan 39e9a09694
refactor(otlp-exporter-base): fix eslint warnigns (#5391) 2025-02-05 18:28:29 +00:00
Godfrey Chan b5885e90e6
refactor(instrumentation-grpc): fix eslint warnings (#5408) 2025-02-05 18:08:11 +00:00
Daniel Dyla 595d0e9c0d
Converge sync and async resources (#5350) 2025-02-03 19:52:16 +00:00
Marc Pichler f9fda8baef
feat(sdk-trace-*):! drop unintentional/unnecessary exports (#5405) 2025-01-31 14:19:21 +00:00
Trent Mick 7332f3a863
chore!: bump min-supported node to ^18.19.0 || >=20.6.0 (#5397)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2025-01-31 09:18:27 +00:00
Marc Pichler 15ba2d7da3
feat(core)!: remove TracesSamplerValues from exports (#5406) 2025-01-31 08:52:40 +00:00
Trent Mick 05c2869ada
chore(semantic-conventions): restore min-supported node to >=14 (#5407) 2025-01-31 08:52:08 +00:00
Godfrey Chan 29d0da559b
refactor(instrumentation-fetch): fix eslint warnings (#5401) 2025-01-30 16:40:10 +00:00
Mend Renovate c513965062
chore(deps): update dependency gh-pages to v6.3.0 (#5403) 2025-01-30 15:40:21 +00:00
Mend Renovate 5903906d10
chore(deps): update dependency mocha to v11.1.0 (#5404) 2025-01-30 15:38:45 +00:00
Godfrey Chan bb212334c7
refactor(exporter-metrics-otlp-http): fix eslint warning (#5396) 2025-01-30 12:38:07 +00:00
Marc Pichler e265e47e98
feat(sdk-trace-base)!: drop ability to auto-instantiate propagators beyond defaults (#5355)
Co-authored-by: Trent Mick <trentm@gmail.com>
2025-01-30 12:33:13 +00:00
Godfrey Chan a04284ccdc
refactor(exporter-*): remove `export * from ...` (#5399) 2025-01-30 12:32:18 +00:00
Godfrey Chan 27bdf71519
[instrumentation-fetch] Use `msw` for fetch instrumentation tests (#5282)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2025-01-30 12:01:02 +00:00
Godfrey Chan 3c040c4ef0
fix(inst-fetch,inst-xhr) Ignore network events with zero-timing (#5332) 2025-01-29 17:49:04 +00:00
Godfrey Chan 1c6c39b454
refactor(core): fix eslint warning (#5382) 2025-01-29 11:57:53 +00:00
Godfrey Chan a686b88bf5
refactor(browser-detector): fix eslint warning (#5384) 2025-01-29 11:54:56 +00:00
Godfrey Chan 22569aca32
fix(exporter-zipkin): remove deprecated `url.parse` usage (#5390) 2025-01-29 11:53:18 +00:00
Godfrey Chan 2759d73ed5
refactor(sdk-trace-node): fix eslint warning (#5387) 2025-01-29 10:17:47 +00:00
Marc Pichler 23adb2bdc5
docs(instrumenation-http): reword documentation about what is geneated (#5378) 2025-01-29 10:12:46 +00:00
Godfrey Chan 682ab65f7c
refactor(sdk-trace-web): fix eslint warning (#5388) 2025-01-29 10:12:21 +00:00
Godfrey Chan d2812d2810
refactor(instrumentation): fix eslint warnings (#5389) 2025-01-29 10:08:18 +00:00
Godfrey Chan e966dc535b
refactor(sdk-metrics): fix eslint warning (#5386) 2025-01-29 09:57:47 +00:00
Serkan ÖZAL e42fbb985f
feat(opentelemetry-instrumentation): replace `semver` package with internal semantic versioning check implementation (#5305)
Co-authored-by: Trent Mick <trentm@gmail.com>
2025-01-28 22:57:04 +00:00
Marc Pichler 199fd8ddd3
feat(sdk-trace-web): do not throw when passing extra options (#5357) 2025-01-27 16:38:27 +00:00
Colin Ihrig 321c31f442
refactor(exporter-prometheus): remove unnecessary `isNaN()` check (#5377) 2025-01-27 16:10:04 +00:00
Colin Ihrig c43f17238c
feat(instrumentation-grpc): monitor error events with events.errorMonitor (#5369)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2025-01-27 16:00:02 +00:00
Colin Ihrig bdc0e3a34c
chore(instrumentation-grpc): remove unused `findIndex()` function (#5372)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2025-01-27 09:44:10 +00:00
Mend Renovate 2a26d08b2e
chore(deps): update all patch versions to v7.26.7 (#5375) 2025-01-27 09:19:35 +00:00
Colin Ihrig 3e013cfd8f
refactor(otlp-exporter-base): remove unnecessary `isNaN()` checks (#5374) 2025-01-27 09:12:34 +00:00
Godfrey Chan f927e82b1d
doc: migrate away from defunct `addMetricReader` in examples (#5349) 2025-01-24 09:09:31 +00:00
Neil Fordyce 0ae25f191e
feat(sdk-trace-base): add stack trace to operation on ended Span warning (#5363)
Co-authored-by: Victor <Zeusvictor88@gmail.com>
2025-01-23 20:15:04 +00:00
Colin Ihrig b4ae9ca61d
feat(sdk-node): lower diagnostic level (#5360)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2025-01-23 20:04:43 +00:00
Marc Pichler df49fb1893
feat(sdk-metrics)!: extract IMetricReader interface and use it over abstract class (#5311) 2025-01-23 16:00:39 +00:00
David Luna 34475825e8
chore: update `module` config in tsconfig.base.json (#5347)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2025-01-23 10:35:36 +00:00
Marc Pichler c00f36ee43
feat(sdk-trace)!: remove ability to have BasicTracerProvider instantiate exporters (#5239) 2025-01-21 12:41:10 +00:00
Connor Pearson 6c04a41443
feat(instrumentation): re-export initialize from import-in-the-middle (#5123)
Signed-off-by: Connor Pearson <connor.pearson@mailbox.org>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2025-01-20 16:22:40 +00:00
Mend Renovate 56c7522693
chore(deps): update dependency markdownlint-cli2 to v0.17.2 (#5352) 2025-01-20 16:02:49 +00:00
Mend Renovate bb22068a27
chore(deps): update dependency eslint-config-prettier to v10 (#5353) 2025-01-20 16:02:06 +00:00
Mend Renovate fc0edd82f6
chore(deps): update dependency webpack-cli to v6 (#5336) 2025-01-13 15:12:36 +00:00
Mend Renovate 95a190a5ac
chore(deps): update dependency ts-loader to v9.5.2 (#5335) 2025-01-13 14:27:55 +00:00
Marc Pichler 6d83f80c13
feat(core)!: remove deprecated samplers (#5316) 2025-01-13 14:25:59 +00:00
Jackson Weber 13e951a001
fix(sdk-metrics) Don't Export from PeriodicExportingMetricReader with No Metrics (#5288)
Co-authored-by: Hector Hernandez <39923391+hectorhdzg@users.noreply.github.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2025-01-13 14:25:05 +00:00
Marc Pichler 6f18ec24d2
test(instrumentation-http): remove tests for deprecated request package (#5328) 2025-01-13 14:21:32 +00:00
Trent Mick cb88833234
fix(exporter-metrics-otlp-http): browser OTLPMetricExporter was not passing config to OTLPMetricExporterBase super class (#5331) 2025-01-13 09:19:23 +00:00
Mend Renovate 6864c2f785
chore(deps): update dependency superagent to v10.1.1 (#5327) 2025-01-10 18:03:08 +00:00
Mend Renovate ebdc3144f2
chore(deps): update dependency @bufbuild/buf to v1.49.0 (#5325) 2025-01-10 17:55:27 +00:00
Mend Renovate 70755a6a80
chore(deps): update dependency nock to v13.5.6 (#5326) 2025-01-10 17:54:44 +00:00
Mend Renovate 37015ee9de
chore(deps): update dependency webpack-cli to v6 (#5294) 2025-01-10 17:30:52 +00:00
Mend Renovate 513ef0d7fb
chore(deps): update dependency markdownlint-cli2 to v0.17.1 (#5321) 2025-01-10 17:28:53 +00:00
Mend Renovate ec638dc193
chore(deps): lock file maintenance (#5323) 2025-01-10 17:02:33 +00:00
Marc Pichler a37692abc7
feat(core)!: remove depreacted IdGenerator and RandomIdGenerator (#5309) 2025-01-10 16:54:44 +00:00
Mend Renovate d35fbab151
chore(deps): update dependency nyc to v17 (#5320) 2025-01-10 16:40:48 +00:00
Mend Renovate 52af860553
chore(deps): update dependency typedoc to v0.27.6 (#5319) 2025-01-10 16:28:43 +00:00
Mend Renovate 12bde40fb6
chore(deps): update dependency babel-loader to v9 (#5318) 2025-01-10 16:17:28 +00:00
Mend Renovate ec9429711e
chore(deps): update dependency typedoc-plugin-missing-exports to v3.1.0 (#5244) 2025-01-10 16:09:44 +00:00
Marc Pichler 4a6021af7a
feat(core)!: remove deprecated InstrumentationLibrary (#5308) 2025-01-10 10:20:09 +00:00
Trent Mick c408d21bb6
chore(selenium-tests): remove internal selenium-tests/ package, it wasn't being used (#5312) 2025-01-09 18:28:42 +00:00
David Luna fddcd199a0
chore!: update typescript to version `5.0.4` (#5145)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2025-01-09 16:49:52 +00:00
Trent Mick 643f2bbfc4
chore(deps): remove unused 'semver' deps from some packages (#5306) 2025-01-09 09:58:49 +00:00
Godfrey Chan 3b56060c51
feat(sdk-metrics)!: drop deprecated `type` field on `MetricDescriptor` (#5291) 2025-01-08 18:05:24 +00:00
Godfrey Chan 04e74d7846
feat(instrumentation-fetch)! Passthrough original request to `applyCustomAttributes` (#5281) 2025-01-08 16:30:06 +00:00
Mend Renovate 42eb824f2f
chore(deps): update dependency chromedriver to v131.0.4 (#5285) 2025-01-07 15:39:44 +00:00
Mend Renovate f44bf10459
chore(deps): lock file maintenance (#5295) 2025-01-07 15:29:52 +00:00
Mend Renovate b2d02d2cc0
chore(deps): update dependency webpack-merge to v6 (#5270) 2025-01-07 14:15:12 +00:00
Godfrey Chan 369d85adbf
chore(deps): update dependency webpack-dev-server to v5 (#5292) 2025-01-07 13:49:26 +00:00
Marc Pichler fa5edc639c
chore(deps): remove webpack-merge where it is not needed (#5289) 2025-01-07 13:17:33 +00:00
Godfrey Chan 9c46e8f87d
[instrumentation-fetch] refactor fetch() tests for clarity, type safety and realism (#5268) 2025-01-07 13:14:29 +00:00
David Luna 90afa2850c
feat(sdk-*)!: align merge resource behavior with spec (#5219)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-12-20 13:38:22 +00:00
Godfrey Chan 8dc74e609a
feat(sdk-metrics)!: Drop deprecated `InstrumentDescriptor` export (#5266) 2024-12-19 13:23:40 +00:00
Godfrey Chan 347dd5f692
chore: update supported versions in 2.0 README (#5287) 2024-12-19 08:41:49 +00:00
Marc Pichler 107637ea28
Merge pull request #5284 from dynatrace-oss-contrib/next-main-2024-12-16
[SDK 2.0] merge changes from `next` to `main`
2024-12-18 19:04:11 +00:00
Marc Pichler 2610521b16 docs: merge changelog and readme 2024-12-18 17:47:46 +01:00
Marc Pichler b8d7966b86
Merge pull request #5275 from dynatrace-oss-contrib/next-main-2024-12-16
[next] merge changes from main
2024-12-18 17:11:48 +01:00
Marc Pichler 4179ddb26c Merge branch 'main' into next-main-2024-12-16 2024-12-18 11:16:17 +01:00
OpenTelemetry Bot 616d27a0a1
chore: prepare next release (#5274)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-12-18 09:49:03 +00:00
Mingaudas Vagonis e524148b48
chore: removed circular dependency from BasicTracerProvider (#5279) 2024-12-18 09:08:09 +00:00
David Ashpole 67a0e9cb0c
Update links to openmetrics to reference the v1.0.0 release (#5267) 2024-12-18 09:04:27 +00:00
Godfrey Chan 0c11fc6325
Fix incorrect CHANGELOG entry on main (`v1.next`) (#5280) 2024-12-18 08:56:01 +00:00
Marc Pichler 8ab52d5479
fix(ci): adapt workflow to use supported npm versions (#5277) 2024-12-17 15:40:03 +00:00
Marc Pichler a8befa6814 Merge branch 'main' into next-main-2024-12-16 2024-12-16 18:03:47 +01:00
Godfrey Chan 6d7a73aa85
refactor(sdk-metrics) Swap workaround types for @otel/api types (#5254) 2024-12-13 18:38:43 +01:00
Marc Pichler 84cce75361
refactor(otlp-transformer): re-structure package to prepare for separate entrypoints (#5264) 2024-12-13 16:14:37 +00:00
Bhaskar Banerjee 6d31a18c34
feat(opentelemetry-sdk-node): automatically configure metrics exporter based on environment variables (#5168)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-12-13 11:33:47 +00:00
Godfrey Chan e03b6e7caa
chore: update prettier to 3.4.2 (#5261) 2024-12-13 11:07:06 +00:00
Arriana Blais e4d9c213f6
fix(instrumentation-fetch, instrumentation-xml-http-request) content length attributes now prese (#5230) 2024-12-12 15:35:41 +00:00
Trent Mick bdee949b8a
doc(semantic-conventions): clarify suggested usage of *unstable* semconv (#5256) 2024-12-12 15:07:44 +00:00
Mend Renovate 61d5a0e291
chore(deps): update dependency chromedriver to v131.0.3 (#5255) 2024-12-12 10:46:43 +00:00
Marc Pichler 887ff1cd6e
docs: re-categoize misplaced changelog entry (#5248) 2024-12-10 15:53:32 +00:00
Michele Azzolari 79e28759f0
feat(sdk-metrics): PeriodicExportingMetricReader now flushes pending tasks at shutdown (#5242) 2024-12-10 15:52:18 +00:00
Marc Pichler 5387343986
test(api): longer timeout for API tree-shaking tests (#5247) 2024-12-10 09:11:45 +00:00
Marc Pichler 9328790c54
docs: document compatible versions (#5246) 2024-12-09 16:41:37 +00:00
Mend Renovate 484af40805
fix(deps): update dependency express to v4.21.2 (#5238) 2024-12-06 09:07:41 +00:00
Marc Pichler 0bc4af6cd8
ci: run browser and worker tests on Node.js 22 (#5237) 2024-12-05 19:41:41 +00:00
Marc Pichler eb81e286c0
Merge pull request #5236 from dynatrace-oss-contrib/next-main-2024-12-04
[next] merge changes from main
2024-12-05 17:21:38 +01:00
Marc Pichler a761a8c4cf
feat(otlp-transformer)!: remove internal types and functions from public API (#5200) 2024-12-05 13:11:01 +00:00
Marc Pichler 47212bb4e1 fix: remove accidentally re-added empty files 2024-12-04 22:50:39 +01:00
Marc Pichler a8b4cd2b9d Merge branch 'main' into next-main-2024-12-04 2024-12-04 22:32:06 +01:00
Mend Renovate 569346ba7b
fix(deps): update all patch versions (#5228) 2024-12-04 19:30:15 +00:00
Luca Casonato 97dff5b375
fix(sdk-trace-base): don't load envs top level (#5233) 2024-12-04 19:29:43 +00:00
OpenTelemetry Bot 85dcbc7c55
chore: prepare next release (#5232) 2024-12-04 16:08:33 +00:00
Marc Pichler b0f73ea11d
fix: de-confuse Nuxt build tooling by not using 'export *' in comments (#5227) 2024-12-03 21:59:48 +00:00
Mend Renovate c9b5bb0bfe
chore(deps): lock file maintenance (#5225) 2024-12-02 09:01:57 +00:00
Marc Pichler fc94e4669a
feat(otlp-exporter-base): implement partial success handling (#5183) 2024-11-28 17:42:15 +00:00
David Luna 810b6183dc
refactor(sdk-trace-base): rename `activeSpanProcessor` private property (#5211) 2024-11-27 20:32:05 +01:00
Mend Renovate fd7f2d951b
fix(deps): update dependency zone.js to v0.15.0 (#5213) 2024-11-27 18:43:54 +00:00
Mend Renovate 17bf0d9a34
chore(deps): update dependency @bufbuild/buf to v1.47.2 (#5210) 2024-11-27 18:35:08 +00:00
Marc Pichler 1249e34591
refactor(otlp-exporter-base): remove exports that were meant to be internal (#5212) 2024-11-27 18:34:07 +00:00
Trivikram Kamat 5ad0aa544b
chore: replace deprecated String.prototype.substr() with substring() (#5209) 2024-11-27 16:10:35 +00:00
Marc Pichler 3bf12847d1
feat(otlp-exporter-base): add http response body to exporter error (#5204) 2024-11-27 09:14:59 +00:00
Trivikram Kamat 561f8ad3a3
fix(docs): broken link for community contribution lifecycle and processes (#5206) 2024-11-27 09:14:23 +00:00
Mend Renovate e80879e093
fix(deps): update dependency axios to v1.7.8 (#5202) 2024-11-26 11:06:05 +00:00
Marc Pichler c9fa209bf9
chore(otlp-exporter-*-grpc): clean up tests (#5196) 2024-11-26 09:58:23 +00:00
Marc Pichler e35f3d659e
chore(exporter-otlp-*-http): clean up tests (#5198) 2024-11-26 09:13:48 +00:00
Marc Pichler 556eecf0f9
chore(otlp-exporter-*-proto): clean up tests (#5199)
Co-authored-by: Trent Mick <trentm@gmail.com>
2024-11-26 08:43:23 +00:00
Marc Pichler e250a0f30b
chore: update prettier to 3.3.3 (#5195)
Co-authored-by: Mend Renovate <bot@renovateapp.com>
2024-11-25 14:18:25 +00:00
Mend Renovate 3a20ed60b0
chore(deps): lock file maintenance (#5194) 2024-11-25 09:16:11 +00:00
David Luna c28abacee5
refactor(sdk-trace-base): make resource private and remove getActiveSpanProcessor API (#5192) 2024-11-25 10:06:31 +01:00
Marc Pichler 1e312c2088
refactor(otlp-exporter-base): don't create blob before sending xhr (#5193) 2024-11-25 09:02:14 +00:00
Mend Renovate ef80821f94
chore(deps): update all patch versions (#5189) 2024-11-21 14:11:00 +00:00
David Luna f3a6310733
refactor(sdk-trace-base): remove `_registeredSpanProcessors` from BasicTracerProvider (#5177) 2024-11-21 14:10:10 +01:00
OpenTelemetry Bot e97cc2ee8e
chore: prepare next release (#5186) 2024-11-20 19:13:20 +00:00
Trent Mick d8bc6b283b
feat(semconv): update semantic conventions to 1.28.0 (#5181) 2024-11-20 17:14:31 +00:00
Marc Pichler ef30dbc94d
docs: fix changelog formatting (#5185) 2024-11-20 16:44:20 +00:00
Marc Pichler dd5b5fbd11
feat(otlp-exporter-base): internally accept a http header provider function only (#5179) 2024-11-20 16:19:36 +00:00
Povilas Versockas a834861418
feat(sdk-metrics): add aggregation cardinality limit (#5128)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-11-20 16:08:54 +00:00
Marc Pichler 91b9abdf21
feat(otlp-transformer)!: accept ResourceMetrics instead of ResoruceMetrics[] in metrics serializers (#5159) 2024-11-20 14:06:33 +00:00
Trent Mick b7c03d29a4
chore(semantic-conventions): docs on entry-points, deprecations; improve some deprecation messages (#5166)
Co-authored-by: Jackson Weber <47067795+JacksonWeber@users.noreply.github.com>
Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>
2024-11-20 12:13:56 +00:00
Mend Renovate 0ee9a27694
chore(deps): update dependency gh-pages to v6.2.0 (#5174) 2024-11-19 16:37:58 +00:00
Mend Renovate 8ad1304098
chore(deps): update dependency linkinator to v6.1.2 (#5175) 2024-11-19 16:20:32 +00:00
Mend Renovate 2a5e0d8224
chore(deps): update dependency markdownlint-cli2 to v0.15.0 (#5176) 2024-11-19 15:54:42 +00:00
Marc Pichler 7e98761bc6
feat(exporters)!: collapse base classes into one (#5031) 2024-11-19 13:47:43 +00:00
Mend Renovate 1370810663
chore(deps): update codecov/codecov-action action to v5 (#5170) 2024-11-18 13:11:13 +00:00
OpenTelemetry Bot 4b1ad3fda0
chore: prepare next release (#5141) 2024-11-18 10:17:34 +00:00
Marc Pichler 9e4d36cb3e
fix(otlp-exporter-base): fix unhandled error when writing to destroyed http request (#5163) 2024-11-18 09:54:10 +00:00
Daniel Dyla d3630afb35
doc: document breaking change in 0.54 (#5169)
Co-authored-by: Marc Pichler <marcpi@edu.aau.at>
2024-11-18 08:50:56 +00:00
Mend Renovate 09a630d304
chore(deps): lock file maintenance (#5171) 2024-11-18 08:47:32 +00:00
Mend Renovate 473bb5edcd
chore(deps): lock file maintenance (#5157) 2024-11-15 21:45:04 +00:00
Mend Renovate 23a47d3fed
chore(deps): update dependency webpack to v5.96.1 (#5164) 2024-11-15 20:36:38 +00:00
Mend Renovate 6096f7238d
chore(deps): update dependency mocha to v10.8.2 (#5162) 2024-11-15 10:43:21 +00:00
Mend Renovate 1aa158bf98
chore(deps): update babel monorepo (#5161) 2024-11-15 09:56:21 +00:00
Trent Mick 363c003a95
fix(semantic-conventions): update deprecated messages for some old constants (#5160) 2024-11-15 09:55:51 +00:00
Marc Pichler 0c268e7127
feat: improve bug template (#5086)
Co-authored-by: Marylia Gutierrez <maryliag@gmail.com>
Co-authored-by: Trent Mick <trentm@gmail.com>
Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>
2024-11-15 09:32:10 +00:00
Mend Renovate 44465081c8
chore(config): migrate renovate config (#5158) 2024-11-14 17:01:31 +00:00
Mend Renovate 5bf7e8957e
chore(deps): update dependency chromedriver to v131 (#5156) 2024-11-14 17:00:58 +00:00
Marc Pichler d51fa95a6f
test(instrumentation): skip unwrap tests for esm (#5153)
Co-authored-by: Mend Renovate <bot@renovateapp.com>
2024-11-14 16:11:44 +00:00
David Luna b7343ef3e0
feat(sdk-trace-base)!: remove `addSpanProcessor` API (#5152) 2024-11-14 17:10:14 +01:00
Mustafa Haddara c78a02fe74
Track request body size in XHR and Fetch instrumentations (#4706)
Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>
2024-11-14 15:51:55 +00:00
Daniel Dyla 56a0308297
fix(sdk-trace): performance.now() may return the same value for consecutive calls (#5150)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-11-14 15:22:04 +00:00
Marc Pichler 4afc190d90
fix(sdk-trace-base): pass BatchSpanProcessor#forceFlush() errors on visibilitychange/pagehide to globalErrorHandler (#5143)
Co-authored-by: Hector Hernandez <39923391+hectorhdzg@users.noreply.github.com>
2024-11-14 09:13:18 +00:00
Marc Pichler a833d9c443
Merge pull request #5144 from dynatrace-oss-contrib/next-main-
[next] merge changes from main
2024-11-13 18:10:49 +01:00
Bruno Heridet 699b9194ba
fix(sdk-node): fix typo `FomEnv` → `FromEnv` (#5146) 2024-11-13 13:43:18 +00:00
Marc Pichler 4a394cc8d7 Merge branch 'main' into next-main- 2024-11-12 17:23:44 +01:00
David Luna db14633cc4
feat(sdk-trace-base): add `spanProcessors` property in `TracerConfig` interface (#5138) 2024-11-12 15:48:00 +00:00
Omar Hassane f1ef5960ae
fix(instrumentation-http): iterating through the OTEL_SEMCONV_STABILITY_OPT_IN content instead of the entry indices (#5137) 2024-11-12 04:36:41 +00:00
Marc Pichler 8483b68f2d
fix(sdk-metrics): await export when async attributes are pending (#5126) 2024-11-11 09:25:30 +00:00
Marc Pichler 012dc9e742
feat(sdk-*): add option to opt-out from merging the resource with Resource.default() (#4617)
Co-authored-by: Trent Mick <trentm@gmail.com>
2024-11-11 09:25:01 +00:00
Trent Mick 4b5c21cede
chore(semantic-conventions): bump weaver; use comment filter rather than deprecated comment_with_prefix (#5100) 2024-11-08 20:25:06 +00:00
Marc Pichler 87bd98edd2
fix(instrumentation-http)!: drop url.parse in favor of URL constructor (#5091) 2024-11-08 16:54:37 +00:00
Marc Pichler 030aff30f7
feat(instrumentation-http)!: reduce public API surface by removing exports and making protected methods private (#5124)
Co-authored-by: Hector Hernandez <39923391+hectorhdzg@users.noreply.github.com>
2024-11-08 16:39:06 +00:00
OpenTelemetry Bot 72c9af9198
chore: prepare next release (#5120) 2024-11-07 12:42:00 +00:00
Serkan ÖZAL fe4d368900
Fix wrapping ESM files with absolute path (#5094)
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
2024-11-06 18:52:31 +00:00
OpenTelemetry Bot 6f4f3fcefd
chore: prepare next release (#5115) 2024-11-05 16:00:32 +00:00
zyoshi (kamitsuk) 33dbde1ede
add reset function test for InMemorySpanExporter (#5107)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-11-05 11:04:31 +00:00
pmlanger 67d771869b
fix(instrumentation-http): skip malformed forwarded headers (#5099) 2024-11-05 11:01:54 +00:00
Mend Renovate ce5bbfb05c
chore(deps): update node.js to v22 (#5109) 2024-11-04 12:57:06 +00:00
Marc Pichler 4c0921ee64
docs: update releasing.md to mention npm publish workflow, fix a link to release PR workflow (#5087) 2024-11-04 12:55:10 +00:00
Annosha 2b73d37c9c
[Fixes # 4533] Replaced cpx2 with local test module (#5077)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
Co-authored-by: Raphaël Thériault <113933910+raphael-theriault-swi@users.noreply.github.com>
Co-authored-by: Jakub Ziółkowski <jakub@rho.co>
Co-authored-by: David Luna <david.luna@elastic.co>
Co-authored-by: Trent Mick <trentm@gmail.com>
Co-authored-by: Marylia Gutierrez <marylia.gutierrez@grafana.com>
Co-authored-by: Mend Renovate <bot@renovateapp.com>
Co-authored-by: Mercy Bassey <57226464+mercybassey@users.noreply.github.com>
Co-authored-by: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com>
2024-11-04 12:54:09 +00:00
OpenTelemetry Bot eb3ca4fb07
chore: prepare next release (#5068) 2024-10-23 14:30:12 +00:00
Marc Pichler 6fee82d868
chore: add @maryliag to approvers (#5083) 2024-10-23 14:11:03 +00:00
Marc Pichler 50d59ca938
feat(instrumentation-http)!: remove deprecated ignore options (#5085) 2024-10-23 11:20:28 +00:00
Mercy Bassey 4497ee3831
Added limitation in ot-shim readme (#5072)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-10-23 11:16:24 +00:00
Marc Pichler 006fe44e56
chore: move xray and xray-lambda propagators to contrib (#4966) 2024-10-23 09:22:55 +00:00
Marc Pichler 330172c1d8
fix(instrumentation-http): add server attributes after they become available (#5081) 2024-10-23 09:15:16 +00:00
Trent Mick 55a1fc88d8
fix(instrumentation-http): fix http/https ESM instr for 'import defaultExport from' style (#5075) 2024-10-22 19:47:13 +00:00
David Luna 508946c853
refactor(sdk-trace-base)!: remove Span class from exports (#5048)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-10-21 17:54:00 +02:00
Mend Renovate 5e1736130e
chore(deps): update dependency chromedriver to v130 (#5080) 2024-10-21 11:13:15 +00:00
Marylia Gutierrez be1737fc46
chore: add markdown lint check to default lint command (#5074)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-10-17 16:07:36 +00:00
Marc Pichler c208991123
test: use venv in w3c trace context test script (#5071) 2024-10-17 07:55:04 +00:00
Marc Pichler 7ed67f98c2
test(otlp-grpc-exporter-base): do not use hard-coded version in tests, touch up changelog entries (#5069) 2024-10-15 07:21:41 +00:00
Marc Pichler a1442fec01
ci: add workflow to publish packages to npm (#5067) 2024-10-14 15:50:56 +00:00
Annosha 7293e69c1e
Added custom test instructions for browser-specific tests (#5056)
Co-authored-by: Trent Mick <trentm@gmail.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-10-14 09:29:39 +00:00
Nev dcc1a874d3
docs: [Browser] Define the support browser runtimes (#5059)
Co-authored-by: Jackson Weber <47067795+JacksonWeber@users.noreply.github.com>
2024-10-14 11:25:19 +02:00
Jakub Ziółkowski 6be903a902
fix(resources): wait for async attributes for detecting resources (#4687)
Co-authored-by: David Luna <david.luna@elastic.co>
2024-10-11 20:59:41 +00:00
Marc Pichler cc8c54ae40
Merge pull request #5052 from dynatrace-oss-contrib/next-main-2024-10-08
[next] merge changes from main
2024-10-10 10:02:28 +02:00
Raphaël Thériault 039db0b3fc
fix(exporter-logs-otlp-proto): Use correct config type in constructor (#5058) 2024-10-10 08:01:10 +00:00
Marc Pichler 859c0ef5a0
ci: use codecov token when uploading reports (#5053) 2024-10-09 08:04:17 +00:00
Marc Pichler b057c93c15 [next] merge changes from main 2024-10-08 14:06:44 +02:00
Marc Pichler 8fed1b1b66
feat(sdk-metrics)!: drop View and Aggregation for options (#4931) 2024-10-08 13:46:31 +02:00
Marc Pichler 6ccd4df33a
docs: use npm ci in CONTRIBUTING.md (#5040) 2024-10-07 20:02:54 +00:00
David Luna 4947c2d6a4
chore(exporter-zipkin): remove usages of Span constructor (#5030)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-10-04 08:42:35 +00:00
Daniel Dyla 776993f0fc
feat(instrumentation-http): emit semconv 1.27 metrics (#5026) 2024-10-04 08:35:04 +00:00
David Luna 7baa493f50
test(instr-http): remove usages of `new Span` (#5035) 2024-10-04 08:00:03 +00:00
Richard Chukwu e0e2b4ad81
fix(sdk-node): use warn instead of error on unknown OTEL_NODE_RESOURCE_DETECTORS values (#5034)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-10-03 14:53:13 +00:00
Marc Pichler 3007d3e749
feat(exporters)!: rewrite exporter config logic (#4971) 2024-09-30 09:33:17 +00:00
Mend Renovate 77f12c57bf
chore(deps): lock file maintenance (#5027) 2024-09-30 07:44:38 +00:00
Rajat Khanna 98143af5db
fix(sdk-trace): make activeSpanProcessor private (#4965)
Co-authored-by: David Luna <david.luna@elastic.co>
2024-09-27 15:55:36 +02:00
David Luna d1cd7f23d0
refactor(instrumentation-http): replace `SpanAttributes` and `MetricAttributes` with `Attributes` (#5023) 2024-09-27 10:57:58 +00:00
David Luna 466140bdf8
refactor(sdk-metrics): replace `MetricsAttributes` with `Attributes` (#5021) 2024-09-27 07:42:21 +00:00
Mend Renovate 2f919a43fd
chore(deps): update dependency @types/jquery to v3.5.31 (#5018) 2024-09-26 14:46:13 +00:00
Richard Versteeg a5dade5462
fix(opentelemetry-core): confusing log extract of composite propagator (#5017) 2024-09-26 14:00:40 +00:00
David Luna 91c67ba470
refactor(resources)!: replace ResourceAttributes with Attributes (#5016) 2024-09-26 09:54:50 +02:00
David Luna e15d5b3bcd
feat(sdk-trace-base): replace SpanAttributes with Attributes (#5009) 2024-09-25 17:32:55 +02:00
Marc Pichler 9de31518e7
fix(events,logs): drop outdated API from devDependencies and align types (#5013) 2024-09-25 14:32:43 +00:00
Mend Renovate 2a4919c1cf
chore(deps): update dependency @types/mocha to v10.0.8 (#4986) 2024-09-24 09:46:21 +00:00
Daniel Dyla 395010f96b
Http server semconv span stable (#4978)
Co-authored-by: Marc Pichler <marcpi@edu.aau.at>
Co-authored-by: Mend Renovate <bot@renovateapp.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-09-24 08:29:08 +00:00
Mend Renovate ee40d5d9b7
chore(deps): update dependency chromedriver to v129 (#5007) 2024-09-24 08:28:26 +00:00
Mend Renovate 1ce52050bd
fix(deps): update dependency express to v4.20.0 [security] (#4989) 2024-09-24 08:27:26 +00:00
Jonathan Lee 5627d8451e
fix(sdk-metrics): Add missing catch and handle error in promise of `PeriodicExportingMetricReader` (#5006) 2024-09-24 08:26:39 +00:00
Mend Renovate 4574bf51c0
chore(deps): lock file maintenance (#5008) 2024-09-23 16:28:24 +00:00
Marc Pichler 42be951958
chore: remove --openssl-legacy-provider option (#5012) 2024-09-23 15:44:49 +00:00
Marc Pichler 8900cfdbba
fix(sdk-trace-base): avoid keeping non-string status.message on Span#setStatus() (#4999) 2024-09-23 15:44:37 +00:00
Marc Pichler 1804925c53
Merge pull request #5010 from dynatrace-oss-contrib/next-main-2024-09-23
[next] merge changes from main
2024-09-23 16:42:41 +02:00
Marc Pichler 32564adbb0 [next] merge changes from main 2024-09-23 16:33:59 +02:00
Marc Pichler f4d0dcf45d Merge branch 'main' into next-main-2024-09-23 2024-09-23 16:27:31 +02:00
Marc Pichler 4ef739580f
ci: switch to codecov action (#5011) 2024-09-23 14:16:02 +00:00
David Luna 6515ed8098
refactor(sdk-logs): replace ResourceAtrributes with Attributes (#5005)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-09-20 11:54:22 +00:00
David Luna 0571e429b6
refactor(browser-detector): replace `ResourceAtrributes` with `Attributes` (#5004) 2024-09-20 11:14:34 +00:00
Mend Renovate cdfefb8294
chore(deps): lock file maintenance (#4995) 2024-09-18 11:56:31 +00:00
David Luna 32e25c31c2
refactor(exporter-prometheus): replace MetricAttributes to Attributes (#4993) 2024-09-17 19:33:01 +00:00
Mend Renovate 92b0c368e8
chore(deps): update dependency babel-loader to v8.4.1 (#4996) 2024-09-17 12:55:43 +00:00
David Luna af0ecacf72
chore(deps): bump @opentelemetry/api dependency to 1.3.0 (#4992)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-09-17 08:13:13 +00:00
Martin Kuba e9eb92476e
feat(web): add processors for adding session ID (#4972)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-09-16 22:25:41 +00:00
Mend Renovate 9c30124e76
fix(deps): update dependency body-parser to v1.20.3 [security] (#4988) 2024-09-11 08:42:54 +00:00
Daniel Dyla f8ab5592dd
Update HTTP client span semconv to 1.27 (#4940)
Co-authored-by: Marc Pichler <marcpi@edu.aau.at>
Co-authored-by: Mend Renovate <bot@renovateapp.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-09-10 13:44:26 +00:00
sjvans 61c37441f5
fix: default compression to 'none' (#4985) 2024-09-10 13:13:55 +00:00
Hector Hernandez f7dc8ff5fa
feat(api-logs): Add delegating no-op logger provider (#4861) 2024-09-09 21:57:11 +00:00
Mend Renovate 016c240613
chore(deps): lock file maintenance (#4984) 2024-09-09 08:40:25 +00:00
Mend Renovate b78fec3406
fix(deps): update dependency axios to v1.7.4 [security] (#4970) 2024-09-04 16:33:41 +00:00
Mend Renovate 3d43356782
chore(deps): update dependency @types/mocha to v10.0.7 (#4974) 2024-09-04 15:39:44 +00:00
Justin Siebert a3983faa44
fix(jaeger-remote-sampler): Catch errors retrieving remote config (#4976) 2024-09-04 15:17:32 +00:00
Trent Mick 9d474e3b96
chore: unpin unit-test from 22.6 (#4977) 2024-09-04 15:17:07 +00:00
Mend Renovate 1fc304c1e9
chore(deps): lock file maintenance (#4968) 2024-09-02 14:13:15 +00:00
Mend Renovate a00a429b2c
chore(deps): update dependency chromedriver to v128.0.1 (#4967) 2024-09-02 11:11:12 +00:00
Mend Renovate e311672daf
chore(deps): update all patch versions (#4942) 2024-08-28 15:32:02 +00:00
Mend Renovate 7b800e124d
chore(deps): update dependency glob to v11 (#4955) 2024-08-28 13:15:12 +00:00
Marc Pichler d7f4288919
chore(deps): update dependency webpack to v5.94.0 (#4961)
Co-authored-by: Mend Renovate <bot@renovateapp.com>
2024-08-28 13:03:24 +00:00
Mend Renovate 41c0d88710
chore(deps): update dependency chromedriver to v128 (#4954)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-08-28 12:46:08 +00:00
OpenTelemetry Bot 720bc8c70d
chore: prepare next release (#4960)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-08-28 09:00:27 +00:00
OpenTelemetry Bot 65cedf71bd
chore: prepare next release (#4949) 2024-08-28 08:47:02 +00:00
Marc Pichler bd25230eae
docs: document console exporter output stability (#4956)
Co-authored-by: Jackson Weber <47067795+JacksonWeber@users.noreply.github.com>
2024-08-28 07:11:10 +00:00
Jamie Danielson 948496dcbf
chore: pin unit test to node 22.6 until 22.8 is available (#4957) 2024-08-27 21:01:31 +00:00
Jamie Danielson 966ac176af
docs: Describe support for ESM (#4876)
Co-authored-by: Trent Mick <trentm@gmail.com>
2024-08-27 08:01:52 +00:00
Trent Mick 2ca2459414
test(exporter-logs-otlp-grpc): improve error reporting in particular test failure (#4953) 2024-08-26 11:35:42 +00:00
Rajat Khanna c398601cc1
feat(jaeger-remote-sampler): Implement jaeger remote sampler (#4589)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
Co-authored-by: Trent Mick <trentm@gmail.com>
2024-08-23 09:36:51 +00:00
OpenTelemetry Bot 3cf1c5215f
chore: prepare next release (#4939) 2024-08-22 15:19:43 +00:00
Marc Pichler 5578a11dfd
chore: sync package-lock.json (#4947) 2024-08-22 13:52:20 +00:00
Daniel 5c1ae0aa5b
docs(sdk-metrics): Update Histogram docs to reflect upper bound inclusivity (#4829)
Co-authored-by: Hector Hernandez <39923391+hectorhdzg@users.noreply.github.com>
2024-08-22 09:14:14 +00:00
Chengzhong Wu 0b8d310cf5
fix(sdk-metrics): use inclusive upper bounds in histogram (#4935)
Co-authored-by: Daniel Patrick <github@danielpatrick.dev>
2024-08-22 09:12:59 +00:00
Trent Mick 0ee398d1e3
fix(instrumentation): ensure .setConfig() results in config.enabled defaulting to true (#4941) 2024-08-22 09:12:34 +00:00
Marc Pichler f7dccbf0a0
Merge pull request #4934 from dynatrace-oss-contrib/next-main-2024-08-21
[next] merge changes from main
2024-08-22 09:51:08 +02:00
Trent Mick 7aff06d793
chore(release): script to align workspace on new semconv package version (#4937) 2024-08-21 17:44:06 +00:00
Marc Pichler 00683ff515 Merge branch 'main' into next-main-2024-08-21 2024-08-21 12:51:01 +02:00
Marc Pichler f2a6bcc204
feat(otlp-exporter-base)!: use transport interface in web exporters (#4895) 2024-08-21 10:35:49 +00:00
Marc Pichler cd4e2bf8c0
fix(otlp-exporter-base): fix handling of destroyed requests (#4929) 2024-08-21 09:30:30 +00:00
Jamie Danielson 583154c919
chore(semconv): Separate SemConv releases to allow different versioning (#4904)
Co-authored-by: Trent Mick <trentm@gmail.com>
2024-08-20 21:29:59 +00:00
MartenH 14d086a234
feat(sdk-node)!: Automatically configure logs exporter (#4740) 2024-08-19 23:26:41 +00:00
Mend Renovate e1522f0f39
chore(deps): update all patch versions (#4923) 2024-08-19 09:23:33 +00:00
Mend Renovate 39ab59d9ad
chore(deps): lock file maintenance (#4927) 2024-08-19 08:03:02 +00:00
Trent Mick fb4619bfc8
fix(instrumentation): drop diag.debug on InstrumentationBase#init not returning any modules (#4925) 2024-08-19 08:02:42 +00:00
Alec Mev bb67268e17
fix(instrumentation): Fix optional property types (#4833) 2024-08-15 20:44:39 +00:00
Mend Renovate f047db9da2
chore(deps): lock file maintenance (#4912) 2024-08-13 15:20:16 +00:00
Mend Renovate 15e6534451
chore(deps): update dependency semver to v7.6.3 (#4916) 2024-08-13 14:58:30 +00:00
Mend Renovate af1efea55c
chore(deps): update dependency mocha to v10.7.3 (#4914) 2024-08-13 14:21:12 +00:00
Mend Renovate fbd28f0332
chore(deps): update babel monorepo (#4913) 2024-08-13 13:14:29 +00:00
Mend Renovate c0e25aaaf5
chore(deps): update dependency superagent to v10 (#4911) 2024-08-13 13:02:18 +00:00
Mend Renovate f947278cb3
chore(deps): update dependency chromedriver to v127.0.2 (#4909) 2024-08-13 12:38:39 +00:00
Mend Renovate 30d1e13876
chore(deps): update dependency chromedriver to v127.0.2 (#4892) 2024-08-12 08:49:34 +00:00
Marc Pichler d4b75c3f0c
docs(api): add `@since` annotations to all types (#4906) 2024-08-12 07:28:21 +00:00
Marc Pichler 3c307994fa
deps(sdk-metrics): remove unused lodash.merge dependency (#4905) 2024-08-09 21:02:30 +00:00
Amir Blum ae25ae3319
fix(api-logs): align AnyValue to spec (#4893) 2024-08-09 19:14:30 +00:00
Robb Kidd cf8edbed43
refactor: remove "export *" in favor of explicit named exports (#4880)
Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>
Co-authored-by: Trent Mick <trentm@gmail.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-08-09 10:42:38 +00:00
Marc Pichler 5cc3dc28d7
fix(otlp-exporter-base)!: ensure we do not retry after the timeout has elapsed (#4889) 2024-08-09 07:34:32 +00:00
Daniel Dyla 01cea7caeb
Use weaver to generate latest semconv 1.27 (#4690)
Co-authored-by: Trent Mick <trentm@gmail.com>
Co-authored-by: Marc Pichler <marcpi@edu.aau.at>
2024-08-07 12:45:34 +00:00
Daniel Dyla 38f6689480
Sync package-lock.json (#4900) 2024-08-02 14:29:54 +00:00
Marc Pichler b2778e1b2f
feat: add release PR workflow (#4849)
Co-authored-by: Trent Mick <trentm@gmail.com>
2024-08-01 09:14:46 +00:00
Marc Pichler 30a46ae547
feat(exporter-*-otlp-*)!: remove some environment variable code from browser exporters (#4886) 2024-07-31 08:36:28 +00:00
Marc Pichler bb9caaf1ef
Merge pull request #4887 from dynatrace-oss-contrib/next-main-2024-07-30
[next] merge latest changes from `main`
2024-07-31 09:32:37 +02:00
Marc Pichler eee78fa2e7 chore: clean up merge 2024-07-30 16:05:29 +02:00
Marc Pichler 154155f7d9 Merge branch 'main' into next-main-2024-07-30 2024-07-30 15:22:29 +02:00
Mend Renovate 08942ba126
chore(deps): update dependency babel-plugin-istanbul to v7 (#4852) 2024-07-30 08:02:49 +00:00
Francesco Novy 1cf1939641
feat(otlp-transformer): Do not limit `@opentelemetry/api` upper range peerDependency (#4816)
* feat: Do not limit `@opentelemetry/api` upper range peerDependency

* Revert "feat: Do not limit `@opentelemetry/api` upper range peerDependency"

This reverts commit d0dd3d577b.

* only unclamp otlp-transformer

* Add changelog entry

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-07-30 07:50:33 +00:00
Mend Renovate 3d66bcbb9c
chore(deps): update dependency karma to v6.4.4 (#4885) 2024-07-30 07:47:42 +00:00
Trent Mick 3f2c707ade
fix(sdk-node): avoid spurious diag errors for unknown OTEL_NODE_RESOURCE_DETECTORS values (#4879)
* fix(sdk-node): avoid spurious diag errors for unknown OTEL_NODE_RESOURCE_DETECTORS values

When NodeSDK is configured with explicit 'resourceDetectors' or
with 'autoDetectResources: false', then it should not emit diag
errors about unknown values in OTEL_NODE_RESOURCE_DETECTORS.
This can happen when that envvar is used with
@opentelemetry/auto-instrumentation-node

Closes: https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2311

* add a changelog entry

* lint:fix
2024-07-30 07:47:22 +00:00
Marc Pichler d91dbe1b1d
feat(exporters)!: use transport interface in node.js exporters (#4743)
* feat(exporters)!: use transport interface in node.js exporters

* feat(exporters): hide compression property

* feat(otlp-exporter-base)!: remove header property

* feat(otlp-exporter-base): add retrying transport

* fix: lint

* chore: add changelog entry

* fix: use queueMicrotask over nextTick

* chore: move changelog entry to unreleased

* chore: note that user-agent cannot be overwritten by users anymore

* fix: export missing ExportResponseRetryable

* fix: retry jitter
2024-07-29 14:54:01 +00:00
Mend Renovate 3460a8c264
chore(deps): update dependency chromedriver to v127 (#4883) 2024-07-29 14:46:50 +00:00
Mend Renovate f2039e856b
chore(deps): update all patch versions (#4860) 2024-07-29 14:37:10 +00:00
Francesco Novy 34003c9b7e
feat(http): Allow to opt-out of instrumenting incoming/outgoing requests (#4643)
* feat(http): Allow to opt-out of instrumenting incoming/outgoing requests

* fix tests

* PR feedback

* add a changelog entry

---------

Co-authored-by: Trent Mick <trentm@gmail.com>
2024-07-25 19:14:37 +00:00
Trent Mick d4035eb973
fix(instrumentation-http): Ensure instrumentation of `http.get` and `https.get` work when used in ESM code (#4866)
* fix(instrumentation-http): Ensure instrumentation of `http.get` and `https.get` work when used in ESM code

The issue was that the `_wrap`ing of `http.get` was getting the
just-wrapped `http.request` by accessing `moduleExports.request`.
However, when wrapping an ES module the `moduleExports` object from IITM
is a Proxy object that allows setting a property, but *not* re-getting
that set property.

The fix is to use the wrapped `http.request` from the `this._wrap` call.
That required fixing a bug in the IITM code-path of
`InstrumentationBase.prototype._wrap` to return the wrapped property.
(The previous code was doing `return Object.defineProperty(...)`, which
returns the moduleExports, not the defined property.)

Fixes: #4857

* correct typo in the changelog message

* does this fix the test:esm script running on windows?

* remove other console.logs (presumably dev leftovers) from tests in this file

* test name suggestion

Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>

* test name suggestion

Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>

* test name suggestion

Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>

* test name suggestion

Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>

* var naming suggestion: expand cres and creq, the abbrev isn't obvious

---------

Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>
2024-07-24 05:08:41 +00:00
Luca Forstner a6020fb113
deps(opentelemetry-instrumentation): Bump shimmer types to 1.2.0 (#4865)
* deps(opentelemetry-instrumentation): Bump shimmer types to 1.2.0

* changelog
2024-07-17 21:40:04 +00:00
Amir Blum 8d88c36dcb
feat: include instrumentation scope info in console span and log record exporters (#4848)
* feat: print instrumentation library info with console span exporter

* chore: add changelog

* test: fix tests for console span exporter

* feat: instrumentation scope for both logs and spans

* chore: update changelog
2024-07-17 05:53:18 +00:00
Oliver Sand 54b14fbbe3
docs(opentelemtry-instrumentation): fix reversed jsdoc comment (#4855)
Signed-off-by: Oliver Sand <oliver@plancraft.de>
2024-07-09 21:16:23 +00:00
Johannes Huster 539d94265b
docs(opentelemetry-browser-detector): Use tree-shakeable string constants for semconv in Readme (#4768)
* docs(opentelemetry-browser-detector): Use tree-shakeable string constants for semconv in Readme

* Update changelog

* Uninstall unused semantic-conventions package from browser-detector package

* Move changelog entry to Unreleased section

* rm changelog entry, I don't think it is necessary for a small docs update

---------

Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>
Co-authored-by: Trent Mick <trentm@gmail.com>
2024-07-05 22:00:32 +00:00
Amir Blum 0f6363ae35
fix(instrumentation)!:remove unused description property from interface (#4847)
* fix(instrumentation):remove unused description property from instrumentation ifc

* chore: changelog
2024-07-04 08:57:55 +00:00
Marc Pichler a037f84b67
chore: drop ts-mocha for mocha and ts-node (#4840)
* chore: drop ts-mocha for mocha and ts-node

* fixup! chore: drop ts-mocha for mocha and ts-node
2024-07-03 14:49:36 +00:00
Mend Renovate fbb1b360eb
fix(deps): update all patch versions (#4822) 2024-07-01 18:47:39 +00:00
Marc Pichler 01a2c35a69
chore: add @JamieDanielson to maintainers (#4824) 2024-06-26 12:13:58 +00:00
Marc Pichler f99e7d9c2c
chore: add @maryliag to triagers (#4821)
* chore: add @maryliag to triagers

* chore: alphabetically order approvers

* chore: it's grafana labs, not grafana
2024-06-25 14:44:48 +00:00
Daniel Starns 3fdadd516e
refactor: reduce and simplify usage of getEnv() (#4799)
* refactor: reduce and simplify usage of getEnv()

* docs: update CHANGELOG

* fixup! docs: update CHANGELOG

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-06-25 07:43:19 +00:00
Mend Renovate 73fad98428
chore(deps): update all patch versions (#4819) 2024-06-24 14:39:23 +00:00
Marc Pichler 08628bce82
chore: add @trentm to maintainers (#4813) 2024-06-24 10:12:57 +00:00
Marc Pichler 86019e0ff6
feat: add release-pr update chores as scripts to package.json (#4793)
* feat: add release-pr update chores as scripts to package.json

* fix: use all instead of api

* docs: update usage comment for extract-latest-release-node.js
2024-06-21 09:07:36 +00:00
Marc Pichler 0608f40557
chore: prepare release 1.25.1/0.52.1 (#4809)
* chore: prepare release 1.25.1/0.52.1

* Update experimental/CHANGELOG.md
2024-06-20 08:25:48 +00:00
Tim Fish cdd5284dc3
feat(instrumentation): Use a caret version for `import-in-the-middle` dependency (#4810)
* feat(instrumentation): Use a caret version for `import-in-the-middle`

* update changelog
2024-06-19 15:58:44 +00:00
Mend Renovate 81f78a6e42
chore(deps): update dependency chromedriver to v126 (#4800) 2024-06-19 11:35:18 +00:00
Mend Renovate 1041ed4fdb
chore(deps): lock file maintenance (#4801) 2024-06-19 11:34:59 +00:00
Tim Fish c07aa537cb
fix: Update `import-in-the-middle` (#4806)
* fix: Update `import-in-the-middle`

* add changelog entry

* linting is important
2024-06-19 09:02:52 +00:00
Marc Pichler 55f15e90d6
feat(sdk-metrics)!: replace attributeKeys with an option to add custom processors (#4532) 2024-06-18 16:17:36 +02:00
Daniel Starns 3cbc9c72e9
docs: add SimpleSpanProcessor warning (#4798)
* docs: add SimpleSpanProcessor warning

* Update packages/opentelemetry-sdk-trace-base/src/export/SimpleSpanProcessor.ts

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-06-18 11:50:44 +00:00
Michał Lipiński 9e421f6a84
docs(exporter-logs-otlp-http): change OTLPLogsExporter to OTLPLogExporter (#4790) 2024-06-18 09:28:13 +00:00
Daniel Starns dd83751f19
docs: change to SEMRESATTRS_SERVICE_NAME (#4797) 2024-06-18 09:23:34 +00:00
Kaung Zin Hein 4fa7c1358e
refactor(examples/opentelemetry-web): use new exported string constants for semconv (#4764)
* refactor(examples/opentelemetry-web): use new exported string constants for semconv

* added changelog entry

* deleted changelog extra line

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-06-14 07:55:20 +00:00
Marc Pichler 812c774998
refactor(context-zone-peer-dep): use explicit exports (#4787)
* refactor(context-zone-peer-dep): use explicit exports

* chore: changelog
2024-06-13 07:40:03 +00:00
Marc Pichler 48854685d3
refactor(context-async-hooks): use explicit exports (#4786)
* refactor(context-async-hooks): use explicit exports

* chore: add changelog entry
2024-06-12 18:49:08 +00:00
Marc Pichler b5409d7acd
refactor(otlp-transformer): use explicit exports (#4785)
* refactor(otlp-transformer): use explicit exports

* chore: add changelog entry

* Update experimental/CHANGELOG.md

* Update experimental/CHANGELOG.md
2024-06-12 18:48:44 +00:00
Mend Renovate c280a08027
fix(deps): update dependency @grpc/grpc-js to v1.10.9 [security] (#4782) 2024-06-11 12:32:51 +00:00
Marc Pichler 05e2699089
fix(sdk-node): register context manager if no tracer options are provided (#4781)
* fix(sdk-node): register context manager if no tracer options are provided

* chore: add changelog entry
2024-06-11 07:25:06 +00:00
Mend Renovate c9ea5f2428
chore(deps): lock file maintenance (#4780) 2024-06-10 12:04:15 +00:00
Trent Mick 01664ddf87
tests: regenerate recently-expired test TLS certs (#4777)
* tests: regenerate recently-expired test TLS certs

Tests started failing yesterday because the various TLS certs in
the repo used for TLS testing had expired

$ openssl x509 -noout -enddate -in experimental/packages/exporter-logs-otlp-grpc/test/certs/ca.crt
notAfter=Jun  7 16:44:23 2024 GMT

This change regenerates all the TLS certs used for testing and
examples/https. It also adds a test case in each relevant package
that will fail with an obvious message when these certs expire
next time (certs are generated with a 1y expiry).

This also adds a comment 'npm run main:regenerate-test-certs'
that can be used to run the maintenance task.

* lint:fix, add changelog entry

* skip cert expiry test on node v14, because crypto.X509Certificate came in node v15
2024-06-10 10:54:49 +00:00
mmouru 2e42181ff0
refactor(instr-fetch): move fetch to use SEMATRR (#4632)
* refactor(instr-fetch): move fetch to use SEMATRR

* Update experimental/CHANGELOG.md

Co-authored-by: Trent Mick <trentm@gmail.com>

* Apply suggestions from code review

update readme table to use attribute strings

* move changelog entry to unreleased

---------

Co-authored-by: Trent Mick <trentm@gmail.com>
Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>
2024-06-08 00:15:51 +00:00
Marc Pichler fd911fb3a4
chore: move haddasbronfman from approver to emeritus (#4765)
* chore: move haddasbronfman from approver to emeritus

* fixup! chore: move haddasbronfman from approver to emeritus
2024-06-07 09:25:04 +00:00
Johannes Huster bd053932b7
refactor(sdk-node): Use tree-shakeable string constants for semconv (#4767)
* refactor(sdk-node): Use tree-shakeable string constants for semconv

* Update changelog
2024-06-07 08:32:03 +00:00
Mend Renovate 6481396a6b
chore(deps): update all patch versions to v7.24.7 (#4772) 2024-06-06 07:52:15 +00:00
Marc Pichler 6bb2f16d85
chore: add @david-luna to approvers (#4766) 2024-06-05 17:28:14 +00:00
Marc Pichler c4d3351b6b
fix(sdk-logs): adapt versions for release (#4769)
* chore(sdk-logs): fixup release PR versions

* fixup! chore(sdk-logs): fixup release PR versions
2024-06-05 15:30:17 +00:00
Marc Pichler 26974c4d07
chore: prepare release API 1.9.0/Core 1.25.0/Experimental 0.52.0 (#4677)
* chore: prepare release

* fixup! chore: prepare release

* chore: sync package-lock.json
2024-06-05 14:51:53 +00:00
Kaung Zin Hein 957fa3b5e4
refactor(examples/esm-http-ts): use new exported string constants for semconv (#4758)
* refactor(examples/ems-http-ts): use new exported string constants for semconv

* added changelog entry

* Update CHANGELOG.md

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-06-05 12:48:25 +00:00
Kaung Zin Hein 97d0ec5a1b
refactor(examples/basic-tracer-node): use new exported string constants for semconv (#4759)
* refactor(examples/basic-tracer-node): use new exported string constants for semconv

* updated semconv pacakge ^1.22.0

* Update CHANGELOG.md

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-06-05 08:25:44 +00:00
Kaung Zin Hein 929e345454
refactor(examples/grpc-js): use new exported string constants for semconv (#4760)
* refactor(examples/grpc-js): use new exported string constants for semconv

* updated semconv package ^1.22.0

* added changelog entry

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-06-05 08:15:37 +00:00
Kaung Zin Hein 97f372b475
refactor(experimental/examples/opencensus-shim): use new exported string constants for semconv (#4763)
* refactor(experimental/examples/opencensus-shim): use new exported string constants for semconv

* added changelog entry (experimental)
2024-06-05 08:13:39 +00:00
Kaung Zin Hein 9cd2021119
refactor(examples/otlp-exporter-node): use new exported string constants for semconv (#4762)
* refactor(examples/otlp-exporter-node): use new exported string constants for semconv

* added changelog entry

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-06-05 08:09:52 +00:00
Kaung Zin Hein de503497b9
refactor(examples/opentracing-shim): use new exported string constants for semconv (#4761)
* refactor(examples/opentracing-shim): use new exported string constants for semconv

* updated semconv to ^1.22.0

* added changelog entry
2024-06-05 08:06:16 +00:00
Martin Kuba 7c808e3117
add Events SDK (#4629)
* feat(sdk-events): add Events SDK

* updated changelog

* markdown lint

* updated changelog with changes to the events API

* added missing implements

* set defaults for severityNumber and timestamp

* added OTLP exporter to example

* updated package-lock.json

* updated versions

* pinned api-logs and api-events versions

* removed getting global LoggerProvider

* updated example version

* removed unnecessary constant

* lint

* updated events example

* pinned api-logs version for logs sdk

* updated package-lock

* removed unused configuration

* added forceFlush and shutdown to EventLoggerProvider

* updated package-lock.json

* updated tsconfig files

* fixed package-lock.json

* removed shutdown method, updated example

* cleanup

* added domain to examples

* updated versions

* fix browser tests
2024-06-05 07:59:05 +00:00
Gerhard Stöbich 9d3bc18f7d
chore: move flarna from approver to emeritus (#4757) 2024-06-05 07:36:53 +00:00
Tim Fish 106fa9bfdd
fix: Update `import-in-the-middle` (#4745)
* fix: Update `import-in-the-middle`

* changelog and lint

* lint

* changes from code review

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-06-05 07:32:53 +00:00
Prashansa Kulshrestha 315239da67
refactor(instrumentation-xhr): use exported strings for semantic attr… (#4681)
* refactor(instrumentation-xhr): use exported strings for semantic attributes

Signed-off-by: Prashansa Kulshrestha <prashkulshrestha@gmail.com>

* Updated changelog entry with PR id and link

Signed-off-by: Prashansa Kulshrestha <prashkulshrestha@gmail.com>

* Changed normal string to template string and replaced old HTTP_RESPONSE_CONTENT_SIZE to new exported string

Signed-off-by: Prashansa Kulshrestha <prashkulshrestha@gmail.com>

---------

Signed-off-by: Prashansa Kulshrestha <prashkulshrestha@gmail.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-06-04 08:24:09 +00:00
Jamie Danielson be9d11c045
chore(resources): update deprecated semconv to use exported strings (#4755)
* chose(resources): update deprecated semconv to use exported strings

* update test to match changes in contrib 2210

* prep changelog

* update changelog

* Update CHANGELOG.md

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-06-04 08:21:38 +00:00
Jamie Danielson 1ef6027457
docs(instrumentation-http): cleanup readme semconv keys (#4754) 2024-06-04 08:18:36 +00:00
Jamie Danielson c66b65f610
chore(exporters): updated deprecated semconv to use exported strings (#4756)
* chore(exporter-zipkin) update deprecated semconv to use exported strings

* chore(exporter-jaeger) update deprecated semconv to use exported strings

* chore(exporter-prometheus): update deprecated semconv to use exported strings

* add changelog

* Update CHANGELOG.md

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-06-04 08:16:01 +00:00
Kaung Zin Hein 0ce7d94e3e
refactor(examples/https): use new exported string constants for semconv (#4753)
* refactor(examples/https): use new exported string constants for semconv

* refactor(examples/https): use new exported string constants for semconv in the https example
2024-06-04 07:37:22 +00:00
Kaung Zin Hein 20074d8cd3
refactor(examples/http): use new exported string constants for semconv (#4750)
* refactor(examples/http): use new exported string constants for semconv

* added changelog entry

* refactor(examples/http): actually use new exported string constants for semconv
2024-06-04 07:35:23 +00:00
Marc Pichler 95edbd9992
feat(instrumentation)!: simplify `registerInstrumentations()` API (#4675)
* feat(instrumentation)!: reduce complexity

* fixup! feat(instrumentation)!: reduce complexity

* fixup! fixup! feat(instrumentation)!: reduce complexity

* fixup! fixup! feat(instrumentation)!: reduce complexity

* fix: re-add accidenally dropped markdownlint-disable
2024-06-03 09:56:31 +00:00
Johannes Huster 55c6c014cf
refactor(shim-opentracing): Use tree-shakeable string constants for semconv (#4746)
* refactor(shim-opentracing): Use tree-shakeable string constants for semconv

* Update changelog

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-06-03 09:48:11 +00:00
Mend Renovate 04dc781a84
chore(deps): update all patch versions (#4751) 2024-06-03 09:42:12 +00:00
Johannes Huster 81b847484e
refactor(sdk-trace-web): Use tree-shakeable string constants for semconv (#4747)
* refactor(sdk-trace-web): Use tree-shakeable string constants for semconv

* Update changelog

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-06-03 09:41:33 +00:00
Johannes Huster 7e72f1cccf
refactor(sdk-trace-node): Use tree-shakeable string constants for semconv (#4748)
* refactor(sdk-trace-node): Use tree-shakeable string constants for semconv

* Update changelog

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-06-03 09:39:15 +00:00
Johannes Huster ba7bdf5465
refactor(sdk-trace-base): Use tree-shakeable string constants for semconv (#4749)
* refactor(sdk-trace-base): Use tree-shakeable string constants for semconv

* Update changelog
2024-06-03 09:37:24 +00:00
Johannes Huster ecc88a38d8
refactor(core): Use (tree-shakeable) string constants for semconv (#4739)
* refactor(core): Use exported strings for semconv

* Update changelog
2024-05-31 10:02:05 +00:00
Marc Pichler 634277f460
fix(deps): remove protobufjs from grpc-base (otlp-transformer used instead), update protobufjs (security) (#4732) 2024-05-31 07:51:56 +00:00
Marc Pichler 82b7526b02
chore(deps): remove unused cpx dependencies and update used ones to cpx2 (#4510)
* chore(deps): remove unused cpx dependencies and update used ones to cpx2

* fix: sync package-lock, introduce timeout
2024-05-28 07:43:24 +00:00
Mend Renovate 7238852445
chore(deps): update all patch versions (#4734) 2024-05-28 07:41:27 +00:00
Samuel Cochrane 4f6d7a4ade
feat(context-zone*): support zone.js 0.12.x (#4736)
Signed-off-by: Samuel Cochrane <chopshoolihan@gmail.co>
2024-05-28 07:39:50 +00:00
Marc Pichler 969a16f911
chore(renovate): set releaseWhen to conflicted to improve merge-queue behavior (#4730) 2024-05-27 08:33:11 +00:00
Clinton Blackburn 095003da3e
feat(api): added synchronous gauge (#4528)
* feat(instrumentation): added synchronous gauge

* fixup! feat(instrumentation): added synchronous gauge

* fixup! feat(instrumentation): added synchronous gauge

* fixup! feat(instrumentation): added synchronous gauge
2024-05-27 08:30:47 +00:00
Mend Renovate 860e5d5746
chore(deps): update dependency @types/sinon to v17 (#4718) 2024-05-23 14:47:48 +00:00
Mend Renovate 182cbb530d
chore(deps): update dependency chromedriver to v125 (#4719) 2024-05-23 13:35:05 +00:00
Mend Renovate 195e5efb4e
chore(deps): update dependency @types/superagent to v8 (#4679) 2024-05-23 13:11:33 +00:00
Mend Renovate d545521580
fix(deps): update all patch versions (#4390) 2024-05-23 13:10:31 +00:00
Marc Pichler c97f21f221
Revert "feat(sdk-trace-node): support xray propagator (#4602)" (#4727)
* Revert "feat(sdk-trace-node): support xray propagator (#4602)"

This reverts commit 75d88f7126.

* chore: sync package-lock.json
2024-05-23 10:33:35 +02:00
Pierre Bertrand 4e778b1257
docs: fix instrumentation-graphql package name in documentation (#4723) 2024-05-22 08:38:32 -07:00
Trent Mick 2d867172b4
docs: fix code example in README (#4726) 2024-05-22 17:26:07 +02:00
Trent Mick e49c4c7f42
chore(lint): refactor Markdown linting to use markdownlint-cli2 (#4713)
* chore(lint): refactor Markdown linting to use markdownlint-cli2

- first commit is just config changes; lint updates will follow

* lint fixes

* fix markdownlint for rule MD045/no-alt-text

* lint config changes for prefering 'dash' style for rule MD004/ul-style

* lint:markdown:fix changes for MD004/ul-style

* manually apply this h3->h2 fix that Amir had in his #4703 PR

* mention markdown linting in the Linting section of the contributor guide

* add link to rules docs

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-05-21 14:44:23 +02:00
Marc Pichler bac68fc7d4
feat: add api release preparation scripts, github release creation scripts (#4704)
* feat: add more scripts for release creation

* Update scripts/extract-latest-release-notes.js

* fix: replace console.log() with console.warn(), ensure get-version.js is a version by checking against a regex

* chore: add comment to describe the regex
2024-05-21 14:36:43 +02:00
Amir Blum d7fcc77d55
docs: enhanced description for instrumentations in package.json (#4715)
* docs: enhanced description for instrumentations in package.json

* chore: CHANGELOG

* fix: do not export description from core package

* fix: revert unrelated change

* fix: remove CHANGELOG entry and fix text
2024-05-21 14:34:47 +02:00
Amir Blum 20182d8804
chore: fix personal info in README (#4714) 2024-05-17 11:04:14 +02:00
Amir Blum 4c01b33826
feat(instrumentation): remove default value for config in base instrumentation constructor (#4695)
* fix(instrumentation)make config object required in base instrumentation

* chore: CHANGELOG

* fix: constructor pattern for instrumentations

* chore: lint fix

* Update experimental/CHANGELOG.md

* Update experimental/CHANGELOG.md

Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>

* Update CHANGELOG.md

---------

Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-05-17 10:19:57 +02:00
Mend Renovate 806fa97ebd
chore(deps): update dependency ts-loader to v9 (#4707) 2024-05-15 17:18:14 +02:00
Marc Pichler a479ddce4b
chore: update versions to 1.24.1/0.51.1, carry over changelog adjustments (#4705)
* fix(resources): prevent circular import (resource -> detector -> resource -> ...) (#4653)

* fix(resources): prevent circular import (resource -> detector -> resource -> ...)

* fixup! fix(resources): prevent circular import (resource -> detector -> resource -> ...)

* fix(core): align inconsistent behavior of getEnv() and getEnvWithoutDefaults() when a process polyfill is used (#4649)

* fix(core): align inconsistent behavior of getEnv() and getEnvWithoutDefaults() when a process polyfill is used

* Update CHANGELOG.md

* fix(deps): update dependency import-in-the-middle to v1.7.4 (#4667)

* fix(exporter-metrics-otlp-grpc) Add explicit otlp-exporter-base depen… (#4678)

* fix(exporter-metrics-otlp-grpc) Add explicit otlp-exporter-base dependency to exporter-metrics-otlp-grpc

* Update CHANGELOG.md

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* chore: sync package-lock.json, adapt changelog

* chore: prepare release 1.24.1/0.51.1

* chore: adjust changelog

* chore: sync package-lock.json

---------

Co-authored-by: Mend Renovate <bot@renovateapp.com>
Co-authored-by: Aksel Allas <allasaksel@gmail.com>
2024-05-15 10:19:42 +02:00
Mend Renovate 3c8c29ac8f
chore(deps): lock file maintenance (#4700) 2024-05-13 16:17:48 -04:00
Amir Blum 50bd46061e
docs(instrumentation): better docs for supportedVersions option (#4693)
* docs(instrumentation): better docs for supportedVersions option

* docs: add recomundation to bound major version

* revert: Instrumentation class changes

* docs: add recommendation in both places

* docs: lint fix

* chore: CHANGLOG

* Update experimental/packages/opentelemetry-instrumentation/src/types.ts

* Update experimental/packages/opentelemetry-instrumentation/src/types.ts

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-05-13 11:21:47 +02:00
Amir Blum 1c6e8b2531
fix(instrumentation)!: remove unused supportedVersions from Instrumentation interface (#4694)
* chore: CHANGLOG

* fix(instrumentation): remove unused property from instrumentations

* chore: CHANGELOG

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-05-13 11:10:57 +02:00
Amir Blum 15b35260df
docs: align all supported versions to a common format (#4696)
* docs: align all supported versions to a common format

* chore: CHANGELOG

* docs: make markdown list

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-05-13 11:08:38 +02:00
Marc Pichler 3ca2f5ba8d
chore(renovate): remove import-in-the-middle from the all-patch ignore list (#4684) 2024-05-13 11:04:19 +02:00
Amir Blum 3cfa78303a
feat(instrumentation): apply unwrap before wrap in base class (#4692)
* feat(instrumentation): apply unwrap before wrap in base class

* chore: CHANGELOG
2024-05-13 10:55:51 +02:00
Chengzhong Wu 4777631b13
chore: remove obsolete submodules (#4688) 2024-05-11 08:22:12 -04:00
Chengzhong Wu ca027b5eed
doc: update legendecas affiliation (#4686) 2024-05-08 19:02:34 +02:00
Mend Renovate 5608bba359
chore(deps): lock file maintenance (#4680) 2024-05-06 13:57:45 +02:00
Amir Blum 46d79f9a5e
feat(instrumentation): add util to execute span customization hook in base class (#4663)
* feat(instrumentation): hoist span event hook execution to base class

* test: add test for new hook runner

* chore: changelog

* fix: use event name from arguments

* fix: remove unused import

* fix: make diag message structual

* make the private function start with underscore

* chore: rename insetrumentation event to span customization hook

* chore: update changelog

* chore: lint fix

* Update experimental/packages/opentelemetry-instrumentation/src/instrumentation.ts

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* chore: move CHANGELOG to experimental

* fix: changelog

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-05-06 12:57:55 +02:00
Aksel Allas a82d875863
fix(exporter-metrics-otlp-grpc) Add explicit otlp-exporter-base depen… (#4678)
* fix(exporter-metrics-otlp-grpc) Add explicit otlp-exporter-base dependency to exporter-metrics-otlp-grpc

* Update CHANGELOG.md

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-05-06 10:34:17 +02:00
Siim Kallas c503ff1394
feat: allow adding links after span creation (#4536)
* feat: allow adding links after span creation

* update changelog

* improve docs

* test: increase coverage

* Update api/CHANGELOG.md

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* update changelog

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-05-06 10:27:34 +02:00
Marc Pichler 1c5de7ac2f
feat!: use serializers in browser exporters (#4581)
* feat!: use serializer in browser exporters

* feat!: remove unused convert

* fixup! feat!: use serializer in browser exporters

* chore: update changleog
2024-05-03 18:25:37 +02:00
Anuraag Sridhar 75d88f7126
feat(sdk-trace-node): support xray propagator (#4602)
* fix(opentelemetry-sdk-trace-node): support xray propagator

Signed-off-by: Anu Sridhar <anu.sridhar@nearmap.com>

* linter fix

Signed-off-by: Anu Sridhar <anu.sridhar@nearmap.com>

* Build trigger

* Update package.json

Revert newline change

* chore: add changelog entry

* fix: lint

---------

Signed-off-by: Anu Sridhar <anu.sridhar@nearmap.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-05-03 15:03:16 +02:00
Martin Kuba b518e16ef8
add AWS X-Ray Lambda propagator (#4554)
* updates tsconfig files

* added tests

* added aws-xray-lambda propagator

* updated README

* updated package-lock file

* markdown lint

* removed browser tests

* lint

* removed opentelemetry- from the package name

* updated package-lock.json

* add experimental disclaimer

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* removed profiling from keywords

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* updated package version to experimental

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* use named export

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* removed changelog

* updated homepage url

* small updates to tests

* lint

* updated changelog

* Update experimental/packages/propagator-aws-xray-lambda/test/AWSXRayLambdaPropagator.test.ts

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* updated tsconfig files

* updated license

* updated readme

* updated versions

* fix: update versions and sync package-lock.json

* fix: move changelog entry

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-05-03 13:00:35 +02:00
Marc Pichler 9400e726d0
chore: update karma-webpack to v5.0.1, adapt tests (#4648)
* chore(deps): update dependency karma-webpack to v5

* feat: add polyfills missing from webpack 5, adapt tests, split up raw env parsing into browser/node specific code

---------

Co-authored-by: Mend Renovate <bot@renovateapp.com>
2024-05-02 10:39:04 +02:00
Amir Blum 157c811274
feat(instrumentation): generic config type in instrumentation base (#4659)
* feat!(instrumentation): generic config type and no default config value

* fix: apply type in base Instrumentation interface

* revert: enabled flag rename

* fix: autoloader types

* chore: lint fix

* revert: default config in constructor to empty object

* revert: make constructor config default empty object

* docs: note that instrumentation config fields are optional

* revert: deftaul type for generic

* revert: default object in instrumentation abstract constructor

* chore: lint fix

* chore: changelog

* fix: changelog in merge
2024-05-02 08:21:18 +03:00
Mend Renovate 753f0a63a2
fix(deps): update dependency import-in-the-middle to v1.7.4 (#4667) 2024-04-30 20:03:36 +02:00
Daniel Dyla 5c84971528
Add node 22 support (#4666)
* Test node 22

* Update changelog and readme
2024-04-30 09:52:04 +02:00
Mend Renovate e86470a53b
chore(deps): update dependency superagent to v9 (#4665)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-04-29 13:52:50 +02:00
Mend Renovate 4d6cf080c7
chore(deps): update dependency chromedriver to v124 (#4664) 2024-04-29 13:45:32 +02:00
Mend Renovate d99e211a31
chore(deps): lock file maintenance (#4652) 2024-04-26 17:26:27 +02:00
Harel Moshe e44895fdac
feat(sdk-logs): emit resource attributes from ConsoleLogRecordExporter (#4646)
* feat(sdk-logs): emit resource attributes from ConsoleLogRecordExporter

* Update CHANGELOG

* Fix test

* Update experimental CHANGELOG

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-04-26 17:02:51 +02:00
Marc Pichler 8c12dd5c42
feat!: move serialization to `@opentelemetry/otlp-transformer` (#4542)
* feat!:move serializers to otlp-transformer

* feat!: use serializeres in protobuf and json exporters

* test(otlp-transformer): add tests for trace serializer

* test(otlp-transformer): add tests for metrics serializer

* test(otlp-transformer): add tests for logs serializer

* chore: resolve more conflicts

* fix: sync package-lock

* chore: cleanup dependencies, unused code, .gitignore

* chore: fix changelog indentation

* fix(otlp-transformer): remove unused useHex from JsonMetricsSerializer

* chore: add comment about how logs data is structured

* docs: move submodule.md, adapt contents

* fixup! Merge branch 'main' into feat/transformer-serializer

* fixup! Merge branch 'main' into feat/transformer-serializer
2024-04-26 16:11:38 +02:00
Marc Pichler 141b457b85
fix(core): align inconsistent behavior of getEnv() and getEnvWithoutDefaults() when a process polyfill is used (#4649)
* fix(core): align inconsistent behavior of getEnv() and getEnvWithoutDefaults() when a process polyfill is used

* Update CHANGELOG.md
2024-04-26 14:46:29 +02:00
Marc Pichler 8079fd6880
fix(resources): prevent circular import (resource -> detector -> resource -> ...) (#4653)
* fix(resources): prevent circular import (resource -> detector -> resource -> ...)

* fixup! fix(resources): prevent circular import (resource -> detector -> resource -> ...)
2024-04-26 14:22:31 +02:00
Marc Pichler 3ab4f765d8
chore: prepare release 1.24.0/0.51.0 (#4650) 2024-04-24 15:46:45 +02:00
Amir Blum 31eb60dc99
feat!(instrumentation): add patch and unpatch diag log messages (#4641)
* refactor(@opentelemetry/instrumentation): add patch and unpatch diag log messages

* chore: CHANGELOG

* fix: exclude version in core packages

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-04-19 13:26:12 +02:00
Amir Blum 99431df2e2
feat!(instrumentation): remove moduleExports generic type from instrumentation registration (#4598)
* feat!(instrumentation): remove moudleExports generic type from instrumentation registration

* fix: lint

* chore: add changelog

* fix: core instrumentations

* docs: update README with the change

* Update experimental/packages/opentelemetry-instrumentation/src/platform/node/instrumentation.ts

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* Update experimental/packages/opentelemetry-instrumentation/src/platform/node/instrumentation.ts

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* Update CHANGELOG.md

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* chore: lint

* revert: sdk-logs in tsconfig

* chore: lint markdown

* Apply suggestions from code review

Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>

* Update experimental/packages/opentelemetry-instrumentation/src/instrumentationNodeModuleFile.ts

Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>

* Update experimental/packages/opentelemetry-instrumentation/src/instrumentationNodeModuleDefinition.ts

Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>

* fix: remove unrelevant eslint ignore

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>
2024-04-19 13:03:39 +02:00
Marylia Gutierrez 73fddf9b5e
feat(sdk-node): add serviceInstanceIdDetector to NodeSDK (#4626)
* feat(sdk-node): add serviceInstanceIDDetector to NodeSDK

Follow up from #4608

Adds the resource detector ServiceInstanceIDDetector on the NodeSDK constructor.
It only gets added by default on any of those conditions:
- the value `serviceinstance` is part of the list `OTEL_NODE_RESOURCE_DETECTORS`
- `OTEL_NODE_EXPERIMENTAL_DEFAULT_SERVICE_INSTANCE_ID` is set to `true`

* remove OTEL_NODE_EXPERIMENTAL_DEFAULT_SERVICE_INSTANCE_ID

Signed-off-by: maryliag <marylia.gutierrez@grafana.com>

* update readme on how to use `OTEL_NODE_RESOURCE_DETECTORS`

* feedback from review

* Update experimental/packages/opentelemetry-sdk-node/README.md

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* feedback from review

---------

Signed-off-by: maryliag <marylia.gutierrez@grafana.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-04-17 15:50:13 +02:00
Mend Renovate 0d6c45697f
fix(deps): update dependency axios to v1.6.0 [security] (#4639) 2024-04-17 11:16:11 +02:00
Severin Neumann 26101229ae
fix: revert modifications to Apache license (#4640)
Signed-off-by: svrnm <neumanns@cisco.com>
2024-04-16 18:01:36 +02:00
Mend Renovate 629bb8398b
chore(deps): lock file maintenance (#4634) 2024-04-16 13:46:20 +02:00
mmouru 0a750eb90b
refactor(instr-grpc): move to use SEMATTRS (#4633)
* refactor(instr-grpc): move to use SEMATTRS

* Update experimental/CHANGELOG.md

* Update experimental/CHANGELOG.md

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-04-16 11:31:15 +02:00
Martin Kuba 7f82b80f3c
Move xray propagator from contrib (no history) (#4603)
* moved aws xray propagator from contrib

* updated package lock file

* updated dev dependencies

* added a note about the original location in README

* updated changelog

* fix: limit package-lock.json changes

* removed status section from readme

* chore: align versions with current release

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-04-16 10:53:51 +02:00
Marc Pichler 87e25c5e01
fix: ensure api is not dropped from workspaces in package-lock.json (#4623) 2024-04-15 13:34:34 +02:00
Hyun Oh 3b5eb239cc
feat(sdk-logs): make dropping attribute print message (#4614)
* feat(sdk-logs): make dropping attribute print message

* chore: update changelog

* chore(sdk-logs): add comment to explain message logic

* Update experimental/CHANGELOG.md

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-04-15 13:13:45 +02:00
Tim Fish da02c8d6b1
fix: Don't use `require` to load `package.json` files (#4593)
* fix: Don't use require to load package.json files

* update changelog

* Move changelog entry

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-04-15 13:12:55 +02:00
Marc Pichler fab27d578a
chore(renovate): enable lock file maintainance (#4628) 2024-04-15 10:32:28 +02:00
Marylia Gutierrez 583cc7c23d
feat(resources): implements `service.instance.id` (#4608)
* feat(node-sdk): implements `service.instance.id`

Implements `service.instance.id`

Signed-off-by: maryliag <marylia.gutierrez@grafana.com>

* implement service instance id by default with env var

use an experimental environment variable to set the default value of `service.instance.id` as default

* Update CHANGELOG.md

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* create separate add experimental for browser and node

create a function to add experimental default values (currently only service instance id, but others can be added in the future),
with the value being set on the node case, but not on the browser case.

Signed-off-by: maryliag <marylia.gutierrez@grafana.com>

* use resource detector for service instance id

use a resource detector for service instance id

* remove references to env variables

* remove Detector and use DetectorSync

remove the Detector and use the DetectorSync instead. Also mark things as experimental.

Signed-off-by: maryliag <marylia.gutierrez@grafana.com>

* Update packages/opentelemetry-resources/src/platform/node/ServiceInstanceIDDetectorSync.ts

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* rename ServiceInstanceIDDetector to ServiceInstanceIDDetectorSync

* change ID to Id

* renaming something temp so git will pick up the name change

it was not picking up the case change on previous commit

* update to final name using Id

---------

Signed-off-by: maryliag <marylia.gutierrez@grafana.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-04-15 10:28:48 +02:00
Marc Pichler 34387774ca
fix(otlp-grpc-exporter-base): avoid TypeError on exporter shutdown (#4612)
* fix(otlp-grpc-exporter-base): avoid TypeError on exporter shutdown

* chore: update changelog

* fix: use gRPC Client type over any

* fixup! fix: use gRPC Client type over any

* fix: use ts-lint/ts-ignore
2024-04-11 15:48:27 +02:00
Trent Mick b067aed8ba
chore(instrumentation): remove accidental devDep on api-logs (#4627)
This package accidentally got a dep and devDep on api-logs, at
different versions. The result was it being pinned at the older
version in package-lock.

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-04-11 10:07:50 +02:00
Trent Mick 7a5db08f75
doc(instr-fetch): mention instr-undici for Node.js fetch() (#4624)
Now that instrumentation-undici exists, point to it for users that want
instrumentation of Node.js' fetch().
2024-04-11 10:07:24 +02:00
Marc Pichler 19660dbc96
test(expoerter-*-grpc): use RegExp to match Deadline Exceeded error (#4620) 2024-04-10 17:40:51 +02:00
Marc Pichler 7fb673cc59
feat(sdk-node): remove deprecated methods from NodeSDK (#4609) 2024-04-10 13:31:24 +02:00
Marc Pichler 0b6463e491
feat(sdk-trace-base): log resource attributes in ConsoleSpanExporter (#4605)
* feat(sdk-trace-base): log resoruce attributes in ConsoleSpanExporter

* fixup! feat(sdk-trace-base): log resoruce attributes in ConsoleSpanExporter
2024-04-10 13:17:42 +02:00
Trent Mick c0468673cb
fix(resources): ensure BrowserDetector does not think Node.js v21 is a browser (#4604)
Fixes: #4561
2024-04-04 15:24:53 -07:00
Marc Pichler b78d4432d8
feat(otlp-transformer): consolidate scope/resource creation in transformer (#4600)
* [chore] consolidate scope/resource creation in transformer

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

* fixup! [chore] consolidate scope/resource creation in transformer

* fixup! [chore] consolidate scope/resource creation in transformer

* chore: add changelog entry

* fixup! [chore] consolidate scope/resource creation in transformer

---------

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
2024-04-04 15:21:54 +02:00
Abinet18 e01f493a24
Fix invalid timings in span events (#4486)
* fix: use reference value to avoid invalid timings in span

* add comment, add to changelog

* donot report invalid timing in span

* lint fix

* fix failing test

* fix failing test 2

* Add tests

* add removed test

* suggested changes

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-04-03 13:21:31 +02:00
Marc Pichler 5231aa2550
chore: prepare release 1.23.0/0.50.0 (#4601) 2024-04-03 09:57:31 +02:00
Clinton Blackburn 928796d853
feat(sdk-metrics): added synchronous gauge to SDK (#4565)
* feat(instrumentation): added synchronous gauge to SDK

* fixup! feat(instrumentation): added synchronous gauge to SDK

* fixup! feat(instrumentation): added synchronous gauge to SDK

* fixup! feat(instrumentation): added synchronous gauge to SDK

* fixup! feat(instrumentation): added synchronous gauge to SDK

* fixup! feat(instrumentation): added synchronous gauge to SDK
2024-04-02 17:31:15 +02:00
Martin Kuba d66e1d75d4
Add `data` field to the Event interface (#4575)
* add `data` field to the Event interface

* updated body field in the Logs SDK

* updated changelog to breaking change

* lint

* added dedicated type for event data field

* added AnyValue and AnyValueMap types for Event data

* changed body type to LogBody

* markdown lint

* updated Logs SDK

* changed to non-breaking change in the core API

* moved AnyValue to Log API, updated changelog
2024-04-02 10:02:52 +02:00
dependabot[bot] f3aedb76ff
chore(deps): bump express from 4.17.3 to 4.19.2 (#4591)
Bumps [express](https://github.com/expressjs/express) from 4.17.3 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.17.3...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-03-29 16:18:09 +01:00
Ievgen Makukh b418d36609
perf(instrumentation-http): remove obvious temp allocations (#4576)
* perf(instrumentation-http): remove obvious temp allocations

* fix: changelog

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-03-29 12:35:48 +01:00
Mend Renovate 9a5688e61f
chore(deps): update dependency chromedriver to v123 (#4577)
Co-authored-by: Nev <54870357+MSNev@users.noreply.github.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-03-29 12:24:42 +01:00
Jamie Danielson 1a0fb4fd5f
docs(instr-http): document semantic conventions and attributes in use (#4587)
* docs(instr-http): document semantic conventions in use

* add changelog entry

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-03-28 14:22:28 +01:00
Mustafa Haddara 900b7d8bfc
feat(opentelemetry-instrumentation-xhr): optionally ignore network events (#4571) 2024-03-28 14:20:51 +01:00
Martin Kuba f6a075be32
Rename EventEmitter to EventLogger in the Events API (#4568)
* renamed EventEmitter to EventLogger

* updated changelog

* renamed remaining references to emitter

* lint
2024-03-25 17:35:20 +01:00
Marylia Gutierrez 97af8e6d4d
feat(sdk-node): add `HostDetector` as default resource detector (#4566)
* feat(node-sdk): add `HostDetector` as default resource detector

Fixes #4282

- Add `HostDetector` to the list of default resource detectors
- Add test to make sure host and process values are being set by default
- Update from deprecated `sdk.detectResources()` to `sdk.start()` on tests
- Update from deprecated `SemanticResourceAttributes.SERVICE_NAME` to `SEMRESATTRS_SERVICE_NAME` on SDK file

* Update experimental/CHANGELOG.md

* fix lint

remove extra lint causing lint error

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-03-25 16:40:56 +01:00
Martin Kuba fec6286127
Remove domain from the Events API (#4569)
* removed domain from the events API

* lint

* updated changelog

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-03-25 10:12:25 +01:00
Ievgen Makukh 5fb65b4145
perf(export): do not allocate arrays if resource has no pending async attributes (#4550)
* perf(eport): do not allocate arrays if resource has no pending async attributes

* perf(export): do not use splice if fit in one batch

* Update CHANGELOG.md

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-03-25 10:03:41 +01:00
Jamie Danielson f9a0d3ec33
refactor(instr-http): use exported strings for semconv (#4573)
* chore(instr-http): use exported strings for semconv

* add changelog entry
2024-03-22 17:17:45 +01:00
Trent Mick 6547440432
fix(sdk-logs): ensure default resource attributes are used as fallbacks when a resource is passed to LoggerProvider (#4564)
Before this Resource.default() attributes would only be used if *no*
resource was given to LoggerProvider. That would mean that
'service.name' and others could be missing, e.g. when called from
NodeSDK.

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-03-21 13:05:01 +01:00
Marc Pichler 5489797344
chore(changelog): move entry that accidentally ended up in a previous version (#4559)
* chore(changelog): move entry that accidentally ended up in a previous version

* fixup! chore(changelog): move entry that accidentally ended up in a previous version
2024-03-21 13:03:00 +01:00
Martin Kuba aabd1a9b00
SBOM workflow using "npm sbom" (#4521)
* add sbom workflow

* generate sbom for each package

* generate sbom API

* add prefix to all files

* conditionally add artifacts to releases

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-03-20 15:46:52 +01:00
Marc Pichler 3a426e8c32
fix(exporters): use parseHeaders() to ensure header-values are not 'undefined' (#4540)
* fix(exporters): use parseHeaders() to ensure header-values are not 'undefined'

* chore: changelog

* fixup! fix(exporters): use parseHeaders() to ensure header-values are not 'undefined'
2024-03-14 15:21:09 +01:00
Jamie King 1b4999f386
docs: spelling corrections (#4530)
* docs: spelling corrections

* chore: feedback on spelling changes
2024-03-11 10:18:41 +01:00
Marc Pichler a30989f420
Merge pull request #4531 from dynatrace-oss-contrib/next-main-2024-03-07
[next] merge changes from main
2024-03-11 09:45:35 +01:00
dependabot[bot] 7fa2c84e6f
chore(deps-dev): bump ip from 1.1.8 to 1.1.9 (#4495)
Bumps [ip](https://github.com/indutny/node-ip) from 1.1.8 to 1.1.9.
- [Commits](https://github.com/indutny/node-ip/compare/v1.1.8...v1.1.9)

---
updated-dependencies:
- dependency-name: ip
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-08 16:58:44 +01:00
Marc Pichler 680406654e [next] merge changes from main 2024-03-07 13:56:45 +01:00
Marc Pichler c379326d92
Merge pull request #4503 from dynatrace-oss-contrib/next-main-2024-02-23
[next] merge changes from `main`
2024-03-07 13:43:26 +01:00
Marc Pichler 63d74cdc36
chore(renovate): remove import-in-the-middle from all-patch group (#4513) 2024-03-06 17:53:41 +01:00
Marc Pichler 5a033e50b3
fix(exporter-*-otlp-grpc)!: lazy load gRPC (#4432)
* fix(exporter-*-otlp-grpc)!: lazy load gRPC
2024-03-06 12:45:22 +01:00
Jackson Weber 75bd7233ea
fix: ConsoleMetricExporter Should Not Export Shallowly (#4522)
* fix: (ConsoleMetricExporter): Increase console log depth to get useful information from metrics.

* update: add contribution to changelog.

* Update CHANGELOG.md
2024-03-06 12:26:39 +01:00
Marc Pichler 3920b158d0
chore: prepare release Experimental 0.49.1 (#4517) 2024-02-29 14:35:54 +01:00
Marc Pichler 8e1996ef0d
fix(instrumentation): remove peer-dependency on @opentelemetry/api-logs (#4515)
* fix(instrumentation): remove peer-dependency on @opentelemetry/api-logs as it's an experimental package

* docs: changelog

* fix: sync package-lock.json
2024-02-29 14:09:39 +01:00
Marc Pichler 7be35c7845
chore: prepare release API 1.8.0/Core 1.21.0/Experimental 0.49.0 (#4504)
* chore: prepare release 1.22.0/0.49.0

* chore: prepare release API 1.8.0
2024-02-29 10:06:15 +01:00
Thomas Burgess 05720ccc41
Fix broken link to getting started page (#4511)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-02-28 10:45:45 +01:00
Yulin Li f1b2c6d212
fix a wrong internal link in examples readme (#4512) 2024-02-28 09:29:01 +02:00
Nev 5637e2a91c
chore: Semantic Conventions export individual strings (#4298)
* chore: Semantic Conventions export individual strings

* Reduce to just emit full strings and add size-limit test output to review the results

* Update generation to use createConstMap for enums where possible

* Move changelog back to Unreleased -- merge shifted it

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-02-23 13:00:58 +01:00
Trent Mick aff48a1f00
fix(instr-fetch): do not enable in Node.js; clarify in docs this instr is for web fetch only (#4498)
* fix(instr-fetch): do not enable in Node.js; clarify in docs this instr is for web fetch only

* add a changelog entry

* add a diagnostic warning if attempting to use instr-fetch in Node.js

* fixup! add a diagnostic warning if attempting to use instr-fetch in Node.js

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-02-23 11:02:06 +01:00
Marc Pichler 12dec9b9cd Merge branch 'main' into next-main-2024-02-23 2024-02-23 10:37:06 +01:00
Marc Pichler 89caef9bb9
Add @david-luna to triagers (#4497) 2024-02-22 13:03:52 +01:00
eldavojohn 356ef8af4a
chore: remove unload event from OTLPExporterBrowserBase (#4438)
* Add the ability for the implementation to provide the binding event for shutdown.

* fix: whoops totally missed the linting formatting fix step

* Remove any concept of a shutdown event

* add change log and obey interface

* no longer need globalthis

* modify the correct changelog and identify this as a breaking change under the scenario in comments

* markdown lint

* Update experimental/CHANGELOG.md

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-02-15 15:07:54 +01:00
Marc Pichler 5bc8cedbd3
fix(otlp-transformer): only use BigInt inside hrTimeToNanos() (#4484)
* fix(otlp-transformer): only use BigInt inside hrTimeToNanos()

* fix: changelog
2024-02-15 14:04:35 +01:00
Marc Pichler 8bbebfd191
feat(instrumentation): add `getModuleDefinitions()` instead of making `init()` public (#4475)
* feat(instrumentation): add getModuleDefinitions() instead of making init() public

* test(instrumetation): add tests for getModuleDefinitions()

* chore: changelog
2024-02-15 13:59:01 +01:00
Marc Pichler 44b0b29dea
Merge pull request #4477 from MikeShi42/patch-1
docs: Update getting started link in README
2024-02-13 09:33:49 +01:00
Mike Shi 7e709a6fd9
docs: Update getting started link in README 2024-02-12 11:49:04 -08:00
Marc Pichler 83becc71bf
Merge pull request #4471 from dynatrace-oss-contrib/next-main-02-09
`[next]` merge changes from `main`
2024-02-12 17:02:25 +01:00
Marc Pichler 01348e6fbc
fix(instrumentation): normalize paths for internal files in scoped packages (#4467)
* fix(instrumentation): normalize paths for internal files in scoped packages

* fix(instrumentation): normalize name passed to onRequire in RequireInTheMiddleSingleton

* fix(instrumentation): apply normalization during filtering internal files

* fix(changelog): add changelog entry

* fix: normalize before filtering

* fix: lint
2024-02-12 13:09:15 +01:00
Marc Pichler 25548fd9a5
feat(context-zone*): support zone.js 0.13.x, 0.14.x (#4469)
* feat(context-zone*): support zone.js 0.13.x, 0.14.x

* fix(changelog): add changelog entry

* fix(changelog): formatting
2024-02-12 13:08:45 +01:00
Marc Pichler 19b433e137 chore: fix conflicts 2024-02-09 14:41:28 +01:00
Marc Pichler b7c53827d4 Merge branch 'main' into next-main-02-09 2024-02-09 14:09:14 +01:00
Chengzhong Wu f86251d40f
docs: shorten readme sections (#4460)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-02-06 16:43:41 +01:00
Marc Pichler 63845ec2e7
fix(sdk-metrics): allow single bucket histograms (#4456)
* fix(sdk-metrics): allow single bucket histograms

* test(sdk-metrics): undefined and null inputs for bucket boundaries

* fixup! test(sdk-metrics): undefined and null inputs for bucket boundaries
2024-02-06 14:35:15 +01:00
Marc Pichler f6712fd450
fix(sdk-metrics): ignore NaN value recordings for histograms (#4455)
* fix(sdk-metrics): ignore NaN value recordings

* fix(changelog): add changelog entry

* test(exporter-prometheus): adapt tests

* fix(sdk-metrics): ignore in accumulation instead

* fix(changelog): update changelog
2024-02-06 14:20:38 +01:00
Matthew Wear 6d276f4d87
fix: handle zero bucket counts in exponential histogram merge (#4459)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-02-06 14:12:05 +01:00
Hector Hernandez 588d8ad14d
Allow LoggerProvider to be specified in Instrumentations (#4314)
* Allow LoggerProvider to be specified in Instrumentations

* Update

* Lint

* Add test

* npm i

* Update changelog

* npm i

* marking setLoggerProvider as optional

* Add check for possible undefined method

* npm i
2024-02-06 11:19:51 +01:00
drewcorlin1 0229434cb5
feat(instrumentation): make InstrumentationAbstract.init public (#4418)
* Make InstrumentationAbstract.init public

* Update changelog

* Update JSDoc

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-02-05 13:50:03 +01:00
Naseem 72c60f17ef
feat(node-sdk): add spanProcessors option (#4454) 2024-02-05 07:05:31 -05:00
Marc Pichler 2df6310351
refactor(instrumentation-grpc): clean up remnants of 'grpc' package instrumentation (#4420)
* refactor(instrumentation-grpc): clean up remnants of 'grpc' package instrumentation

* fix(changelog): add changelog entry
2024-01-31 16:41:16 +01:00
Jackson Weber efa6307319
fix(sdk-node): Allow Defining Sampler with Exporter in Env (#4394)
* fix(sdk-node): Allow tracerProvider to be created when exporter is defined in the env.

* fix(node-sdk): Update to not accept when exporter is set to none.

* fix(sdk-node): Update Changelog.

* fix(sdk-node): Fix Changelog.

* fix(sdk-node): cleanup changelog.

* fix(sdk-node): lint fix

* fix(sdk-node): Fix logic for creating tracerProviders.

* Fix lint.

* Update experimental/CHANGELOG.md

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* Fix manual sampler and environment exporter case.

* Update logic to check for a defined traceExporter on the config before using the NodeTracerProvider.

* Fix equality check.

* Update env exporter configuration logic and add tests.

* Update experimental/CHANGELOG.md

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* Fix changelog issues.

* Clean up tracerProvider logic.

* Update sdk.ts

* Update sdk.ts

* Update experimental/packages/opentelemetry-sdk-node/test/sdk.test.ts

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* Update experimental/packages/opentelemetry-sdk-node/test/sdk.test.ts

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* Update experimental/packages/opentelemetry-sdk-node/test/sdk.test.ts

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-01-31 09:11:45 -05:00
Chengzhong Wu ac75b70dde
fix(api): fix unreachable @opentelemetry/api/experimental entry (#4446) 2024-01-31 11:57:28 +08:00
Marc Pichler c98a5d31ea
chore: remove checked in auto-generated version.js files (#4448) 2024-01-31 10:50:54 +08:00
Aksel Allas 4655895ba1
feat(add-aggregation-selector-option-to-otlp-metric-exporter) (#4409) 2024-01-29 10:23:38 +01:00
Marc Pichler 828f2ed730
chore: prepare release 1.21.0/0.48.0 (#4442)
* chore: prepare release 1.21.0/0.48.0

* chore: sync package-lock.json
2024-01-26 06:53:40 +01:00
rdeavila94 37119908d6
fix(instrumentation-fetch): compatibility with Map inputs for request headers with fetch (#4348)
* fix(@opentelemetry-instrumentation-fetch): compatibility with Map inputs for request headers with fetch

* Update experimental/CHANGELOG.md

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* adding description for ts-ignore

* fix(changlog): move entry to unreleased

* fix: add lint ignore

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-01-25 09:45:37 +01:00
François 5afbcdbe0a
docs: add observableGauge to the prometheus experimental example (#4267)
* docs: add observableGauge to the prometheus experimental example

Signed-off-by: Francois LP <francois.le.pape@gmail.com>

* docs: add gauge image to README

Signed-off-by: Francois LP <francois.le.pape@gmail.com>

* refactor: change comment wording

from @pichlermarc

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

---------

Signed-off-by: Francois LP <francois.le.pape@gmail.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
2024-01-25 08:52:41 +01:00
Chengzhong Wu bf4d553ef8
refactor(exporter-prometheus): promisify prometheus tests (#4431)
* refactor(exporter-prometheus): promisify prometheus tests

* fix: lint

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-01-25 08:52:10 +01:00
Vladimir Adamić df63272408
fix(exporter-logs-otlp-*): set User-Agent header (#4398)
* fix(exporter-logs-otlp-grpc): set User-Agent header

* fix(exporter-logs-otlp-http): set User-Agent header

* fix(exporter-logs-otlp-proto): set User-Agent header

* chore(changelog): update changelog

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-01-25 08:39:16 +01:00
Marc Pichler 8648313ed8
fix(instrumentation)!: pin import-in-the-middle@1.7.1 (#4441)
* fix(instrumentation): pin import-in-the-middle@1.7.1

* fix(changelog): add changlog entry

* Update experimental/CHANGELOG.md

Co-authored-by: Trent Mick <trentm@gmail.com>

* fix(changelog): additional details

* fix(changelog): formatting

* fix(changelog): lint

---------

Co-authored-by: Trent Mick <trentm@gmail.com>
2024-01-25 08:20:47 +01:00
Zirak 0635ab1c6c
fix(sdk-trace-base): Export processed spans while exporter failed (#4287)
* fix(sdk-trace-base): Export processed spans while exporter failed

While the exporter deals with a batch of spans, new spans may come in and wait
to be exported. As previously implemented, a successful export would notice
these waiting spans, triggering a renewed timer check, but not so for an
unsuccessful export.

The result was that, prior to this commit, a failing export may end up in a
situation where no further spans will be exported. This is due to the behaviour
of `_addToBuffer` when the queue is full: Imagine an export which fails after a
long timeout (because of, for instance, network troubles). While the connection
waits to be timed out, the span queue fills up. Once completely full, no new
calls to recheck the timer will be done. On its own, this behaviour is
fine. When combined with the patched bug, this leads to a rather confusing case
where the exporter never tries exporting.

* fix(changelog): add entry

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-01-24 15:57:13 +01:00
Marc Pichler a9af247259
feat(sdk-metrics)!: remove MeterProvider.addMetricReader() in favor of constructor option (#4419)
* feat(sdk-metrics)!: remove MeterProvider.addMetricReader() in favor of constructor option

* fix(changelog): add changelog entry
2024-01-24 14:38:18 +01:00
Marc Pichler 0f6518dd63
feat(sdk-metrics): deprecate MeterProvider.addMetricReader() in favor of 'readers' constructor option (#4427)
* feat(sdk-metrics): add 'readers' constructor option, deprecate MeterProvider.addMetricReader()

* fix(changelog): update changelog entry, fix format
2024-01-24 14:30:06 +01:00
Jamie Danielson 0aba75ceef
chore(otel-resources): replace deprecated spanAttributes (#4428)
* chore(otel-resources): replace deprecated spanAttributes

* update minimum api version to 1.1

* update changelog

* per legendecas, add todo for ResourceAttributes

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-01-22 23:35:50 +08:00
Jamie Danielson 97276869cd
chore(shim-opentracing): replace deprecated spanAttributes (#4430)
* chore(shim-opentracing): replace deprecated spanAttributes

* update minimum api version to 1.1

* keep newline in package.json

* update changelog
2024-01-19 12:47:12 +01:00
Chengzhong Wu 43e598e7c1
test: transpile zone.js products in test (#4423) 2024-01-18 10:42:50 +01:00
Marc Pichler 2a3c26437f
refactor(core): drop unnecessary assignment of HOSTNAME (#4421)
* fix(core): drop unnecessary assignemnt of HOSTNAME

* fix(changelog): add changelog entry

* Update CHANGELOG.md

* fix(changelog): move entry to internal
2024-01-18 11:46:04 +08:00
Jamie Danielson 7f613e0491
chore(otel-core): replace deprecated SpanAttributes (#4408)
* chore(otel-core): replace deprecated spanAttributes

* update changelog

* keep new line at bottom of package.json
2024-01-17 09:00:17 +01:00
Rodger Brennan bf8714edcb
chore(opentelemetry-context-zone-peer-dep): support zone.js ^v0.13.0 (#4320)
* chore(opentelemetry-context-zone-peer-dep):
update deps to support angular 16
closes issue #4245

Signed-off-by: rbrennan <4884521+rodgerbrennan@users.noreply.github.com>

* update packages

* Revert "update packages"

This reverts commit 624df4ea2e.

* chore: sync package-lock.json

* chore: sync package-lock.json

* chore: sync package-lock.json

* Update ZoneContextManager.test to use ES5 UMD bundle

* add changelog

* remove trailing space from changelog

---------

Signed-off-by: rbrennan <4884521+rodgerbrennan@users.noreply.github.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-01-17 11:45:56 +08:00
Sebastian Poxhofer 71ef1b1f2c
feat(SugaredTracer): add draft of sugaredTracer (#3317)
* feat(api): add experimental package and SugaredTracer

* tests(api/experimental): add tests

* fix: packages.json exports

* move export into experimental package

* add additional tests

* fix: do not use catch and finally for compatibility with Node 8

---------

Co-authored-by: Chengzhong Wu <legendecas@gmail.com>
2024-01-16 17:25:17 +08:00
Marc Pichler 6898a34512
fix(sdk-trace-base): ensure attribute value length limit is enforced on span creation (#4417)
* fix(sdk-trace-base): ensure attribute value length limit is enforced on span creation

* fix(changelog): add changelog entry
2024-01-15 15:53:52 +01:00
Daniel Dyla fac6d147a1
[next] remove README and add warning (#4226)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-01-15 15:52:51 +01:00
Marc Pichler 57008533ab
chore: prepare release 1.20.0/0.47.0 (#4410)
* chore: prepare release 1.20.0/0.47.0

* Update experimental/CHANGELOG.md

Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>

* fix(readme): add entry to compatibility matrix

---------

Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>
2024-01-15 10:58:49 +01:00
dependabot[bot] b7e3d44fd1
chore(deps): bump follow-redirects from 1.15.3 to 1.15.4 (#4411)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.3...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-12 14:22:29 +01:00
Vladimir Adamić ae0a3c522d
fix(exporter-logs-otlp-proto): programatic headers take precedence ov… (#4351)
* fix(exporter-logs-otlp-proto): programatic headers take precedence over environment variables

* chore: update PR url in changelog

* chore: fix deletion of env var

* fix(exporter-logs-otlp-http): programatic headers take precedence over environment variables

* fix(exporter-trace-otlp-http): programatic headers take precedence over environment variables

* fix(exporter-trace-otlp-proto): programatic headers take precedence over environment variable

* chore: update CHANGELOG

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2024-01-03 17:42:17 +01:00
Marc Pichler b36ab12d16
fix(instrumentation): do not import 'path' in browser runtimes (#4386)
* fix(instrumentation): do not import 'path' in browser runtimes

* fix(changelog): clean up and add entry

* fix(instrumentation): add missing license header

* fix(changelog): formatting

* fix(instrumentation): do not throw
2024-01-03 17:41:23 +01:00
Mend Renovate 0206181c49
chore(deps): update github/codeql-action action to v3 (#4391) 2024-01-03 14:17:16 +01:00
Marc Pichler f4b681d4f3
fix(instrumentation): use caret range on import-in-the-middle (#4380)
* fix(instrumentation): use caret on import-in-the-middle

* fix: add chanelog entry

---------

Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
2023-12-20 14:32:52 +01:00
Siim Kallas a512494ba2
perf: remove unnecessary base64 encode+decode from OTLP export (#4343)
* fix: remove unnecessary base64 encoding for span contexts

* chore: add changelog

---------

Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
2023-12-19 16:05:32 -05:00
Mend Renovate 42aaae0270
chore(deps): update dependency chromedriver to v120 (#4374) 2023-12-19 14:59:34 -05:00
C. T. Lin 3cf2cf60c5
fix(instrumentation): bump import-in-the-middle to 1.7.2 (#4379) 2023-12-19 13:40:28 +01:00
Marc Pichler 37add77095
fix(ci): ensure deploy workflow does not override benchmark data (#4376) 2023-12-18 17:58:30 +01:00
Martin Kubliniak 3e59291321
feat(sdk-trace-base): improve log messages when dropping span events (#4223) 2023-12-15 15:36:29 +08:00
Hector Hernandez d828041a52
fix(sdk-logs): await async resources in log processors (#4349) 2023-12-15 14:09:35 +08:00
Marc Pichler d3c311aec2
chore: prepare release 1.19.0/0.46.0 (#4358)
* chore: prepare release 1.19.0/0.46.0

* fix(changelog): move entry
2023-12-14 13:17:38 +01:00
Mend Renovate 02de4ab720
chore(deps): update dependency @types/webpack to v5 (#4368) 2023-12-14 10:35:52 +01:00
Mend Renovate d286bf6498
fix(deps): update dependency import-in-the-middle to v1.7.1 (#4367) 2023-12-14 09:57:42 +01:00
Daniel Dyla 1cbaaf08b2
chore(deps): update webpack to latest (#4340)
* Update webpack to latest

* Skip tree shake test on node 8

* Update webpack utility modules

* lint

* Apply review comments

* Invert test skip

* Use process.versions.node

* Remove approval requirement for webpack
2023-12-13 14:36:54 -05:00
Daniel Dyla ba00147a77
chore: remove checks for unsupported versions (#4341)
* chore: remove checks for unsupported versions

* Remove final version checks

* Changelog

* Lint
2023-12-13 09:32:42 -05:00
Daniel Dyla ea8bfa283a
`[next]` merge changes from `main` (#4363)
* Add Trent to approvers (#4311)

* chore(renovate): require dashboard approval for lerna updates (#4276)

* chore(ci): install semver globally to speed up "peer-api" workflow (#4270)

Closes: #4242

* fix(ci): remove token setup via environment variable from .npmrc (#4329)

* fix(instrumentation-http): resume responses when there is no response listener

Fixes a memory leak where unhandled response bodies pile up in node 20

* feat: add script to update changelogs on release preparation (#4315)

* feat: add script to update changelogs on releases

* fix: address comments

* Apply suggestions from code review

Co-authored-by: Trent Mick <trentm@gmail.com>

* fix: apply suggestions from code review

* fix: use packageJson.version instead of version

---------

Co-authored-by: Trent Mick <trentm@gmail.com>

* Fix event name

* test: make rawRequest HTTP-compliant

* Add node 20 to test matrix

* Enable old hash functions on 20

* Fix esm handling for iitm node 20

* Use err.code to make test more reliable

* Changelog

* nit: single import

* Remove unused files

* Add v20 to supported runtimes

* ci: add npm cache in actions/setup-node (#4271)

* feat(sdk-logs): add droppedAttributesCount field to ReadableLogRecord (#4289)

* feat(sdk-logs): add droppedAttributesCount field to ReadableLogRecord

* chore: check droppedAttributesCount value in test case

* feat(otlp-transformer): make toLogRecord() use ReadableLogRecord.droppedAttributesCount

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* fix(api-logs): allow passing in TimeInput for LogRecord (#4345)

* fix: allow passing in TimeInput for LogRecord

* chore: update changelog

* fix: programmatic url and headers take precedence in metric exporters… (#4334)

* fix: programmatic url and headers take precedence in metric exporters (#2370)

* chore: adjust grpc exporter metrics test

* chore(changelog): update changelog

* fix(instrumentation-http): do not mutate given headers object for outgoing http requests (#4346)

Fixes: https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1609

* chore(deps): update actions/stale action to v9 (#4353)

* fix(deps): update dependency import-in-the-middle to v1.6.0 (#4357)

* chore(deps): update all patch versions (#4306)

* chore(ci): use node 20 in lint workflow (#4359)

* chore(deps): update dependency linkinator to v6 (#4237)

* fix(otlp-exporter-base): decrease default concurrency limit to 30 (#4211)

* fix(otlp-exporter-base): decrease concurrency limit to 30

* fix(changelog): add changelog entry

* chore(deps): use actions/checkout >4 instead of 4.0.0 exactly (#4361)

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
Co-authored-by: strivly <133362191+strivly@users.noreply.github.com>
Co-authored-by: Trent Mick <trentm@gmail.com>
Co-authored-by: lyzlisa <34400837+lyzlisa@users.noreply.github.com>
Co-authored-by: Hyun Oh <hyunnoh01@gmail.com>
Co-authored-by: Siim Kallas <siimkallas@gmail.com>
Co-authored-by: Vladimir Adamić <441333+Vunovati@users.noreply.github.com>
Co-authored-by: Mend Renovate <bot@renovateapp.com>
2023-12-13 08:57:52 -05:00
Marc Pichler 4fe1ae8aaf
chore(deps): use actions/checkout >4 instead of 4.0.0 exactly (#4361) 2023-12-13 10:16:19 +01:00
Marc Pichler af4f7a9daf
fix(otlp-exporter-base): decrease default concurrency limit to 30 (#4211)
* fix(otlp-exporter-base): decrease concurrency limit to 30

* fix(changelog): add changelog entry
2023-12-13 16:47:52 +08:00
Mend Renovate dddab06aa4
chore(deps): update dependency linkinator to v6 (#4237) 2023-12-12 17:04:22 +01:00
Marc Pichler 6be10fbd8d
chore(ci): use node 20 in lint workflow (#4359) 2023-12-12 16:53:35 +01:00
Mend Renovate 237c757242
chore(deps): update all patch versions (#4306) 2023-12-12 16:43:29 +01:00
Mend Renovate 9349c68c2f
fix(deps): update dependency import-in-the-middle to v1.6.0 (#4357) 2023-12-12 14:16:42 +01:00
Mend Renovate 4e77c1dee6
chore(deps): update actions/stale action to v9 (#4353) 2023-12-12 13:54:48 +01:00
Daniel Dyla 09bdeba200
chore: require changelog entries for next branch (#4342) 2023-12-12 11:15:02 +08:00
Trent Mick 5b0fb7b40d
fix(instrumentation-http): do not mutate given headers object for outgoing http requests (#4346)
Fixes: https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1609
2023-12-06 08:08:18 -08:00
Vladimir Adamić 4daa2640d2
fix: programmatic url and headers take precedence in metric exporters… (#4334)
* fix: programmatic url and headers take precedence in metric exporters (#2370)

* chore: adjust grpc exporter metrics test

* chore(changelog): update changelog
2023-12-06 11:51:17 +01:00
Siim Kallas 104a5e8867
fix(api-logs): allow passing in TimeInput for LogRecord (#4345)
* fix: allow passing in TimeInput for LogRecord

* chore: update changelog
2023-12-06 10:14:24 +01:00
Hyun Oh dcf93e8506
feat(sdk-logs): add droppedAttributesCount field to ReadableLogRecord (#4289)
* feat(sdk-logs): add droppedAttributesCount field to ReadableLogRecord

* chore: check droppedAttributesCount value in test case

* feat(otlp-transformer): make toLogRecord() use ReadableLogRecord.droppedAttributesCount

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-12-05 08:48:21 -05:00
lyzlisa 9e9453649d
ci: add npm cache in actions/setup-node (#4271) 2023-12-01 10:30:50 -08:00
Daniel Dyla 6dd075cdf6
Merge pull request #4336 from dyladan/test-20
Add node 20 to test matrix
2023-12-01 11:20:54 -05:00
Daniel Dyla 1447ad5223
Add v20 to supported runtimes 2023-12-01 11:10:56 -05:00
Daniel Dyla a81e0eaa14
Remove unused files 2023-11-30 11:48:22 -05:00
Daniel Dyla c4e75fb953
nit: single import 2023-11-30 11:47:08 -05:00
Daniel Dyla 0b7dc46f56
Changelog 2023-11-30 09:52:26 -05:00
Daniel Dyla 317c93dec8
Use err.code to make test more reliable 2023-11-30 09:49:36 -05:00
Daniel Dyla 3e2fcdaebb
Fix esm handling for iitm node 20 2023-11-30 09:48:11 -05:00
Daniel Dyla c0034ce3e5
Enable old hash functions on 20 2023-11-30 09:31:03 -05:00
Daniel Dyla d0d95816b9
Add node 20 to test matrix 2023-11-30 09:23:34 -05:00
Daniel Dyla 593d220465
Merge pull request #4335 from dyladan/node-20-test
test: make rawRequest HTTP-compliant
2023-11-30 09:22:44 -05:00
Daniel Dyla 0a52166bbd
Merge branch 'main' into node-20-test 2023-11-30 09:14:14 -05:00
Daniel Dyla cc4ff2d158
Merge pull request #4332 from dyladan/node-20-leak
fix(instrumentation-http): resume responses when there is no response…
2023-11-30 09:10:53 -05:00
Daniel Dyla 3f96f1ff83
Merge branch 'main' into node-20-leak 2023-11-30 09:02:09 -05:00
Daniel Dyla 1dda06a803
Merge branch 'main' into node-20-test 2023-11-30 08:58:34 -05:00
Daniel Dyla 470a2bf79b
test: make rawRequest HTTP-compliant 2023-11-30 08:38:58 -05:00
Daniel Dyla bf8ee62a1e
Fix event name 2023-11-30 08:37:03 -05:00
Marc Pichler f654636502
feat: add script to update changelogs on release preparation (#4315)
* feat: add script to update changelogs on releases

* fix: address comments

* Apply suggestions from code review

Co-authored-by: Trent Mick <trentm@gmail.com>

* fix: apply suggestions from code review

* fix: use packageJson.version instead of version

---------

Co-authored-by: Trent Mick <trentm@gmail.com>
2023-11-30 08:50:29 +01:00
Daniel Dyla 762a65a6e4
fix(instrumentation-http): resume responses when there is no response listener
Fixes a memory leak where unhandled response bodies pile up in node 20
2023-11-29 16:12:03 -05:00
Marc Pichler 38db748685
fix(ci): remove token setup via environment variable from .npmrc (#4329) 2023-11-29 17:28:21 +01:00
strivly 8067d97210
chore(ci): install semver globally to speed up "peer-api" workflow (#4270)
Closes: #4242
2023-11-23 15:54:44 -08:00
Daniel Dyla 35be022db1
Merge pull request #4295 from dyladan/deprecate-old-runtimes
[next] Deprecate old runtimes
2023-11-22 10:39:37 -05:00
Daniel Dyla 543f0b470c
Benchmark a tested version 2023-11-22 08:08:57 -05:00
Marc Pichler b3a539d301
chore(renovate): require dashboard approval for lerna updates (#4276) 2023-11-22 06:55:04 +01:00
Daniel Dyla 3b8f0aff95
Merge branch 'deprecate-old-runtimes' of github.com:dyladan/opentelemetry-js into deprecate-old-runtimes 2023-11-21 12:40:06 -05:00
Daniel Dyla dc10b81ee9
Bump to 18 on other workflows 2023-11-21 12:39:58 -05:00
Daniel Dyla 5be08f47f0
Merge branch 'next' into deprecate-old-runtimes 2023-11-21 08:04:16 -05:00
Daniel Dyla 26fcb884fd
Merge pull request #4308 from dyladan/next-main-11-16
[next] merge main
2023-11-21 08:03:53 -05:00
Daniel Dyla 079c1f547a
Add Trent to approvers (#4311) 2023-11-20 10:33:26 -05:00
Daniel Dyla 21da78f76c
Export node module file 2023-11-20 10:20:07 -05:00
Daniel Dyla 4cbb6351f8
Move node module file to root 2023-11-20 10:09:33 -05:00
Daniel Dyla bf30779119
Do not export node-specific names 2023-11-20 09:56:53 -05:00
Daniel Dyla 343ca78015
lint 2023-11-17 14:29:53 -05:00
Daniel Dyla d229b3ad31
Temporarily disable node 20 2023-11-17 14:29:53 -05:00
Daniel Dyla 7cf46c794b
Name exports to fix ESM tests 2023-11-17 14:29:53 -05:00
Daniel Dyla 9d62673d2c
Fix prom test for node 20 2023-11-17 14:29:52 -05:00
Daniel Dyla ab52a8420a
[next] deprecate 14,16 and support 20 2023-11-17 14:29:51 -05:00
Daniel Dyla 6031bb4ddc
Merge branch 'next' into next-main-11-16 2023-11-17 08:29:27 -05:00
Daniel Dyla ba4de42a4b
Execute binaries from root node modules (#4304) 2023-11-17 07:40:02 +01:00
Daniel Dyla e0efd7aa3d
Merge remote-tracking branch 'origin/main' into next-main-11-16 2023-11-16 16:09:45 -05:00
Daniel Dyla 51be418b3d
Execute binaries from root node modules (#4302) 2023-11-16 15:56:26 -05:00
Mend Renovate 4eddf51eb9
chore(deps): update all patch versions (#4255) 2023-11-15 15:32:57 -05:00
Marc Pichler 2c7d5c427f
chore: fix npm release preparation scripts, add .npmrc and release script (#4275)
Co-authored-by: Trent Mick <trentm@gmail.com>
2023-11-15 18:44:57 +01:00
Daniel Dyla 0f8aa7924f
Update `next` branch (#4294)
* chore: track package-lock.json (#4238)

* chore: track package-lock.json

* Pin to old versions for node 14

* Use version range

* Remove unused cached directories

* Temporarily disable other tests

* Temporarily enable only api test

* Enable only some packages

* Test only api packages

* Test trace exporters

* Fix line ordering

* Test all packages except otlp exporters

* Add trace http exporter

* Add trace proto exporter

* Test all but grpc exporters

* chore: use npm workspaces and degrade lerna to v6

* chore: get rid of lerna bootstrap

* chore: use npx

* chore: allow install scripts to setup buf

* chore: fix w3c-integration-test cache key

* chore: fix cache key

* chore: disable resource compat test

* chore: fix node_modules assumptions

* chore: fix hoisted karma issue

* chore: fix markdown linter complaints

* chore: lock @grpc/grpc-js to v1.8.21

* Break caches

* chore: remove cache

* chore: fixup inline commands

---------

Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>

* docs: fixed link to benchmark results (#4233)

Co-authored-by: Chengzhong Wu <legendecas@gmail.com>

* chore(deps): update all patch versions (#4215)

* fix: otlp json encoding (#4220)

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* fix: remove duplicate export star from version.ts (#4225)

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* docs: fix sdk-node config instructions (#4249)

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* feat(api): publish api esnext target (#4231)

* chore: release API 1.7.0/Core 1.18.0/Experimental 0.45.0 (#4254)

* fix(sdk-metrics): hand-roll MetricAdvice type as older API versions do not include it (#4260)

* chore: prepare release 1.18.1/0.45.1 (#4261)

* chore: no need for 'packages' in "lerna.json" (#4264)

* Benchmark tests for trace OTLP transform and BatchSpanProcessor (#4218)

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* chore: type reference on zone.js (#4257)

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* docs: add docker-compose to run prometheus for the experimental example (#4268)

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* fix(sdk-logs): avoid map attribute set when count limit exceeded (#4195)

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* chore(deps): update dependency chromedriver to v119 [security] (#4280)

* chore(deps): update actions/setup-node action to v4 (#4236)

* fix(sdk-trace-base): processor onStart called with a span having empty attributes (#4277)

Co-authored-by: artahmetaj <artahmetaj@yahoo.com>

* Update fetch instrumentation to be runtime agnostic (#4063)

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

---------

Co-authored-by: Chengzhong Wu <legendecas@gmail.com>
Co-authored-by: Martin Kuba <martin@martinkuba.com>
Co-authored-by: Mend Renovate <bot@renovateapp.com>
Co-authored-by: Siim Kallas <siimkallas@gmail.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
Co-authored-by: David Luna <david.luna@elastic.co>
Co-authored-by: Dinko Osrecki <dinko.osrecki@emarsys.com>
Co-authored-by: Trent Mick <trentm@gmail.com>
Co-authored-by: François <32224751+Lp-Francois@users.noreply.github.com>
Co-authored-by: Hyun Oh <hyunnoh01@gmail.com>
Co-authored-by: André Cruz <andremiguelcruz@msn.com>
Co-authored-by: artahmetaj <artahmetaj@yahoo.com>
Co-authored-by: drewcorlin1 <82601620+drewcorlin1@users.noreply.github.com>
2023-11-15 11:15:51 -05:00
drewcorlin1 5ed54c8a09
Update fetch instrumentation to be runtime agnostic (#4063)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-11-15 17:09:15 +01:00
André Cruz 10f6c46057
fix(sdk-trace-base): processor onStart called with a span having empty attributes (#4277)
Co-authored-by: artahmetaj <artahmetaj@yahoo.com>
2023-11-15 15:28:45 +01:00
Mend Renovate b0c0ace8fc
chore(deps): update actions/setup-node action to v4 (#4236) 2023-11-14 08:56:13 +01:00
Mend Renovate b41cada2d2
chore(deps): update dependency chromedriver to v119 [security] (#4280) 2023-11-13 14:55:15 +01:00
Hyun Oh f5ef8de1cc
fix(sdk-logs): avoid map attribute set when count limit exceeded (#4195)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-11-09 17:19:46 +01:00
François 40fde0f69f
docs: add docker-compose to run prometheus for the experimental example (#4268)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-11-09 17:17:44 +01:00
Chengzhong Wu f2b447dad5
chore: type reference on zone.js (#4257)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-11-09 15:25:11 +01:00
Martin Kuba 654638a430
Benchmark tests for trace OTLP transform and BatchSpanProcessor (#4218)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-11-09 14:57:00 +01:00
Trent Mick c478c11975
chore: no need for 'packages' in "lerna.json" (#4264) 2023-11-09 14:32:18 +01:00
Marc Pichler f665499096
chore: prepare release 1.18.1/0.45.1 (#4261) 2023-11-08 18:51:43 +01:00
Marc Pichler c7c1867c82
fix(sdk-metrics): hand-roll MetricAdvice type as older API versions do not include it (#4260) 2023-11-08 12:56:29 +01:00
Marc Pichler 73b446688f
chore: release API 1.7.0/Core 1.18.0/Experimental 0.45.0 (#4254) 2023-11-07 11:25:24 +01:00
Chengzhong Wu 9fd1948e0d
feat(api): publish api esnext target (#4231) 2023-11-07 10:25:33 +01:00
Dinko Osrecki d434f84253
docs: fix sdk-node config instructions (#4249)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-11-06 16:13:09 +01:00
David Luna cd232cde14
fix: remove duplicate export star from version.ts (#4225)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-11-06 16:11:05 +01:00
Siim Kallas 9db6352d30
fix: otlp json encoding (#4220)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-11-06 16:09:52 +01:00
Mend Renovate 586def466b
chore(deps): update all patch versions (#4215) 2023-11-06 11:27:06 +01:00
Martin Kuba 95471d1cce
docs: fixed link to benchmark results (#4233)
Co-authored-by: Chengzhong Wu <legendecas@gmail.com>
2023-11-02 11:08:17 +08:00
Chengzhong Wu e9328abb68
chore: track package-lock.json (#4238)
* chore: track package-lock.json

* Pin to old versions for node 14

* Use version range

* Remove unused cached directories

* Temporarily disable other tests

* Temporarily enable only api test

* Enable only some packages

* Test only api packages

* Test trace exporters

* Fix line ordering

* Test all packages except otlp exporters

* Add trace http exporter

* Add trace proto exporter

* Test all but grpc exporters

* chore: use npm workspaces and degrade lerna to v6

* chore: get rid of lerna bootstrap

* chore: use npx

* chore: allow install scripts to setup buf

* chore: fix w3c-integration-test cache key

* chore: fix cache key

* chore: disable resource compat test

* chore: fix node_modules assumptions

* chore: fix hoisted karma issue

* chore: fix markdown linter complaints

* chore: lock @grpc/grpc-js to v1.8.21

* Break caches

* chore: remove cache

* chore: fixup inline commands

---------

Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
2023-11-01 19:51:24 -04:00
Luismi Ramírez 1c7d7a3542
fix(sdk-node) Remove @opentelemetry/exporter-jaeger explicit dependency (#4214) 2023-10-19 08:14:18 +02:00
Marc Pichler 7f52f70d22
fix: bump deploy docs workflow to node 18 (#4199) 2023-10-18 13:57:07 +02:00
Mend Renovate 00e78efd84
chore(deps): update all patch versions (#4194) 2023-10-17 12:36:24 +02:00
Chengzhong Wu b6e532bf52
feat(metrics): prototype experimental advice support (#3876)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-10-11 10:05:03 +02:00
Marc Pichler f8e187b473
chore: release SDK 1.17.1/Experimental 0.44.0 (#4183) 2023-10-10 15:46:49 +02:00
Marc Pichler 4eb10f7c9d
fix(sdk-metrics): prevent per-reader storages from keeping unreported accumulations in memory (#4163) 2023-10-10 15:27:12 +02:00
Daniel Dyla c320c981c5
deps: update proto-loader (#4192) 2023-10-07 17:53:41 +08:00
Marc Pichler 5fd3737aa3
chore: remove outdated and empty docs (#4181) 2023-10-07 17:40:54 +08:00
Mend Renovate 84861cd827
chore(deps): update dependency @types/jquery to v3.5.21 (#4187)
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
2023-10-06 10:30:35 -04:00
Einar Norðfjörð 912256184c
fix: BatchExporter should export continuously when batch size is reached (#3958)
* fix: BathExporter should export continuously when batch size is reached

* fix: add tests

* lintfix

* add changelog

* add test for concurrency

* Update CHANGELOG.md

* Apply suggestions from code review

* Lint and fix browser tests

* fix: lint

---------

Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-10-06 10:27:47 -04:00
Martin Kuba 5ce32c0fe5
Added performance benchmarking doc (#4169)
Co-authored-by: Tyler Benson <tylerbenson@gmail.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-10-04 09:02:25 +02:00
Mend Renovate 5af865386a
chore(deps): update dependency @types/sinon to v10.0.18 (#4179) 2023-10-03 15:59:56 +02:00
Marc Pichler 868f75e448
fix(benchmark): write benchmark results to file (#4172) 2023-10-01 22:00:15 +02:00
Martin Kuba c84698d4a1
Benchmark tests workflow (#4144)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-09-29 06:45:56 +02:00
Marc Pichler 52f428a9f1
fix(sdk-metrics): do not report empty scopes and metrics (#4135) 2023-09-28 14:17:06 +02:00
FelipeEmerim f0ceabc57c
fix(exporter-zipkin): round timestamp to nearest integer in zipkin annotations (#4167)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-09-28 14:15:48 +02:00
Siim Kallas 513d0679a5
fix(otlp-transformer): avoid precision loss when converting HrTime to unix nanoseconds (#4062)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-09-28 13:44:17 +02:00
Mend Renovate 6bf1b78653
chore(deps): update all patch versions (#4161) 2023-09-28 09:07:34 +02:00
cristianmadularu 24997089da
fix(otlp-exporter-base): replaced usage of window with _globalThis (#4157)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-09-26 14:58:07 +02:00
Chengzhong Wu 2b9832ecb5
fix(sdk-logs): hide internal methods with internal shared state (#3865)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-09-26 09:13:58 +08:00
Aaron Abbott f2fc0d8787
fix(sdk-metrics): allow instrument names to contain '/' (#4155) 2023-09-21 10:02:50 +02:00
Martin Kuba 1a8652aa54
Introduce benchmark tests (#4105)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-09-19 16:39:10 +02:00
Aaron Abbott cbc5c52085
docs: update OpenCensus shim example for metrics (#4078) 2023-09-19 11:07:26 +02:00
Marc Pichler be1627267f
feat(exporter-metrics-otlp-proto): add esm build (#4099) 2023-09-18 17:30:52 +02:00
Mend Renovate ed27a37678
chore(deps): update dependency eslint-config-prettier to v9 (#4042) 2023-09-18 16:10:30 +02:00
Mend Renovate f038b44fe9
chore(deps): update all patch versions (#4152) 2023-09-18 13:57:30 +02:00
Mend Renovate 30d1fcac78
chore(deps): update all patch versions (#4147) 2023-09-15 06:59:39 +02:00
Aaron Abbott 4a4059bc85
feat(opencensus-shim): implement OpenCensus metric producer (#4066) 2023-09-14 23:17:43 +02:00
Marc Pichler 937cfaa64b
fix(readme): update compatibility table and remove API column (#4104) 2023-09-14 11:33:47 +02:00
Vadim Korolik 5615b1c185
fix(sdk-node): move @opentelemetry/exporter-jaeger to dev dependencies (#4049) 2023-09-13 09:12:20 +02:00
Marc Pichler 4f28f90fd9
fix(codeql): run workflow for pushes to main and pull requests (#4110) 2023-09-12 17:02:42 +02:00
Vladimir Adamić f6ebf0e1d6
chore(exporter-logs-otlp-proto): rename OTLPLogsExporter to OTLPLogEx… (#4140) 2023-09-12 16:46:20 +02:00
Marc Pichler faf939c775
chore: release API 1.6.0/SDK 1.17.0/Experimental 0.43.0 (#4138) 2023-09-12 13:47:22 +02:00
Marc Pichler 27897d6c34
Revert "feat(api): add attributes argument to recordException API (#4071)" (#4137) 2023-09-11 17:36:09 +02:00
Marc Pichler 5fcd8cf136
chore: prepare release API 1.5.0, SDK 1.16.0/0.42.0 (#4122) 2023-09-11 14:01:30 +02:00
Mend Renovate 5d94185e2e
chore(deps): update actions/checkout action to v4 (#4134) 2023-09-11 13:57:44 +02:00
Mend Renovate ba38804c05
chore(deps): update all patch versions (#4114) 2023-09-08 12:20:57 -04:00
Marc Pichler 415b198c03
fix(ci): pin nx to 15.9.6 for Node.js v14 (#4124) 2023-09-07 10:20:44 +02:00
Chengzhong Wu 4d662cf84d
fix(sdk-metrics): metric names should be case-insensitive (#4059)
* fix(sdk-metrics): metric names should be case-insensitive

* fixup!

* fixup!
2023-09-07 08:41:06 +03:00
matthew 9452607a7f
docs(guidelines) tiny fix, add comma on docs (#4119) 2023-09-06 11:13:53 +02:00
Mend Renovate 6d174e2a06
chore(deps): update dependency markdownlint-cli to v0.36.0 (#4113) 2023-09-04 13:22:14 +02:00
Marc Pichler cacb8259ef
fix: limit npm to <10.0.0 on node v14 and v16 (#4111) 2023-09-02 20:46:58 +02:00
Mend Renovate 5b7f619130
chore(deps): update dependency @babel/preset-env to v7.22.14 (#4103) 2023-08-31 13:04:59 +02:00
Mend Renovate 1da2b1bb11
chore(deps): update dependency prettier to v3.0.3 (#4092)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-08-30 16:05:51 +02:00
Dima Voytenko cd4998a4b5
feat(api): add attributes argument to recordException API (#4071)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-08-30 16:04:34 +02:00
Marc Pichler c84637f264
fix(exporter-logs-otlp-http): add @opentelemetry/api-logs as dependency (#3968)
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
2023-08-29 15:29:16 +02:00
Marc Pichler 432d43942e
chore(sdk-node): add notice to manually install '@opentelemetry/exporter-jaeger' (#4068)
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
2023-08-29 14:51:46 +02:00
Mend Renovate d8a14ea5b2
chore(deps): update all patch versions (#4087)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-08-29 14:45:34 +02:00
Mend Renovate 6e7df295bf
fix(deps): update dependency axios to v1.5.0 (#4089)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-08-29 14:44:46 +02:00
Aaron Abbott a793321c62
feat: update PeriodicExportingMetricReader and PrometheusExporter to accept optional metric producers (#4077)
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-08-29 14:37:14 +02:00
Marc Pichler 0cc9a0b10b
fix(renovate): remove faulty '@types/node' rule and explicitly apply it to the whole repo (#4091) 2023-08-29 10:36:23 +02:00
Mend Renovate 8ac369f87e
chore(deps): update all patch versions (#4050) 2023-08-24 08:48:43 -04:00
Mend Renovate c230076c69
chore(deps): update dependency gh-pages to v6 (#4058) 2023-08-23 14:42:58 -04:00
Marc Pichler dfe9bdd32c
chore(deps): update prettier to v3 and prettier-plugin-eslint to v5 (#4075)
* chore(deps): update dependency prettier to v3

* chore: bump prettier-plugin-eslint and apply rules

---------

Co-authored-by: Mend Renovate <bot@renovateapp.com>
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
2023-08-23 14:36:11 -04:00
shashi3kiran3 863c4d4028
chore(sdk-node): deprecate methods in favor of constructor options (#3996) (#4076)
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
2023-08-23 14:14:50 -04:00
Daniel Dyla 92050b55ad
docs: fix broken link to renovate.json (#4085) 2023-08-23 12:01:51 -04:00
Haddas Bronfman f263ab7134
docs(guidelines): add dependencies guidelines (#4040)
* docs(guidelines): add dependencies guidelines

* docs(guidelines): add line to CHANGELOG

* Update GUIDELINES.md

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* Update GUIDELINES.md

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* Update GUIDELINES.md

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* Update GUIDELINES.md

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* Update GUIDELINES.md

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* Update GUIDELINES.md

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* docs(guidelines): lint

* Update GUIDELINES.md

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* Update GUIDELINES.md

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>

* Move guidelines to doc directory

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
2023-08-23 11:40:57 -04:00
Marc Pichler cd539dd2d0
chore: move inactive approvers to emeritus (#4069)
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
2023-08-23 11:28:55 -04:00
Mend Renovate 34660b5372
chore(deps): update dependency chromedriver to v116 (#4080) 2023-08-23 11:13:22 -04:00
Gabriel Poulenard-Talbot b400c2e5d9
fix(zipkin-exporter): round duration for zipkin (#4064)
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
2023-08-17 17:16:42 +02:00
Marc Pichler 5259a0b928
chore(sdk-node): deprecate methods in favor of constructor options (#3996) 2023-08-16 14:38:03 +02:00
Marc Pichler 853a7b6ede
fix(changelog): fix incorrect version for latest experimental release (#4047) 2023-08-13 12:08:59 +03:00
Amir Blum 902229afd8
chore: update blumamir employee name in the README (#4052)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-08-10 11:23:28 +02:00
Aaron Abbott d3436bfac5
feat(sdk-metrics): implement MetricProducer specification (#4007)
Co-authored-by: David Ashpole <dashpole@google.com>
2023-08-10 10:27:47 +02:00
Marc Pichler 48fb15862e
chore: prepare release 1.15.2/0.41.2 (#4036) 2023-08-08 14:59:06 +02:00
Mend Renovate ffe641c08c
chore(deps): update all patch versions (#4043) 2023-08-08 10:21:55 +02:00
Katherine a4213183b0
fix(parseKeyPairsIntoRecord): allow equals in baggage value #3974 (#3975)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-08-07 18:11:46 +02:00
Marc Pichler 3732256f02
docs(README): clarify browser support (#4037)
Co-authored-by: Patrice Chalin <chalin@users.noreply.github.com>
2023-08-07 17:14:30 +02:00
Hunter Paulson 5fd656bb08
docs(resources): Fixes detectResources deprecated typos (#4003)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-08-03 15:11:24 +02:00
Mend Renovate b4cda7a9db
chore(deps): update all patch versions (#3997) 2023-08-02 12:49:36 +02:00
Chengzhong Wu 4cffe5dfef
fix(sdk-metrics): ignore invalid metric values (#3988)
Co-authored-by: Haddas Bronfman <85441461+haddasbronfman@users.noreply.github.com>
2023-08-01 17:16:07 +02:00
Marc Pichler 87fff2ece4
fix(instrumentation-grpc): instrument @grpc/grpc-js Client methods (#3804) 2023-08-01 16:12:40 +02:00
Aaron Abbott 1a7488ecdd
chore(exporter-logs-otlp-http): commit missing generated changes to tsconfig.json (#4032)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-08-01 15:21:01 +02:00
Marc Pichler 0755a5c076
fix(ci): don't collect coverage for eol tests (#4030) 2023-08-01 14:20:02 +02:00
Aaron Abbott c021b10b14
fix(core): stop rounding to nearest int in hrTimeTo*seconds() functions (#4014) 2023-07-31 14:14:12 +08:00
Nev 2b20565d10
fix: Add otel-api as dev dep for sandbox tests (#4020)
* fix: Add otel-api as dev dep for sandbox tests

* fix changelog formatting
2023-07-26 12:43:54 -04:00
Daniel Dyla 9f71800fdc
chore: prepare release 1.15.1/0.41.1 (#4016) 2023-07-24 09:44:44 -04:00
Daniel Dyla 0f20b2a974
Revert tslib #3914 (#4011)
* Revert "feat(minification): Add noEmitHelpers, importHelpers and tslib as a dependency (#3914)"

This reverts commit 74393ac639.

* Changelog

* Update CHANGELOG.md
2023-07-21 09:41:09 -04:00
Mend Renovate 87f21ef8ae
chore(deps): update dependency nock to v13.3.2 (#3994) 2023-07-14 12:49:00 +02:00
Mend Renovate 65483a4fe9
chore(deps): update all patch versions (#3984) 2023-07-13 15:49:25 +02:00
Chengzhong Wu 5352cc78b6
chore: apply update-ts-configs (#3987) 2023-07-13 12:58:25 +02:00
Marc Pichler 013695d45d
docs(api-logs): add disclaimers (#3979) 2023-07-11 08:51:11 +02:00
Pushpak Prateek 552abc8221
feat(sdk-node): logs support added (#3969) 2023-07-10 18:55:53 +02:00
Jamie Danielson fc28665d09
docs(sdk-metrics): add example of exponential histogram metric (#3855)
Co-authored-by: Chengzhong Wu <legendecas@gmail.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-07-10 17:31:57 +02:00
Mend Renovate 6d13eb4379
chore(deps): update dependency semver to v7.5.4 (#3977) 2023-07-10 10:36:44 +02:00
Mend Renovate cab31aadb1
chore(deps): update all patch versions (#3972) 2023-07-07 10:10:00 +02:00
Mend Renovate 68039c55ec
chore(deps): update dependency eslint to v8.44.0 (#3916) 2023-07-06 15:27:02 +02:00
Marc Pichler b34c39bf32
chore(deps): update dependency eslint to v8.43.0 (#3929)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2023-07-06 15:14:56 +02:00
Marc Pichler 02c1d95608
chore: replace istanbul-instrumenter-loader with maintained component (#3918) 2023-07-06 15:06:00 +02:00
Marc Pichler 06e919d6c9
chore: prepare release 1.15 / 0.41 (#3963) 2023-07-06 13:06:26 +02:00
Mend Renovate a675ae817b
chore(deps): update all patch versions to v7.22.6 (#3965) 2023-07-05 11:21:20 +02:00
Abinet18 ea160d9c5c
fix: add secureConnectionStart to https only (#3879)
Co-authored-by: t2t2 <taavot@gmail.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-07-05 10:29:28 +02:00
粒粒橙 dccd90603b
chore(instrumentation-grpc): cleanup remnants of grpc-native support (#3886) 2023-07-04 17:25:43 +02:00
Marc Pichler c51c9eb954
docs(otlp-exporters): update docs to reflect OTLP 0.20.0 is used (#3938)
Co-authored-by: Gerhard Stöbich <deb2001-github@yahoo.de>
2023-07-04 15:23:08 +02:00
Mend Renovate de5cd0f409
fix(deps): update dependency import-in-the-middle to v1.4.1 (#3962) 2023-07-03 14:25:58 +02:00
Jackson Weber 1ce8a899cf
Update the Prometheus Exporter to by Default not Append Timestamp (#3961) 2023-07-03 13:34:35 +02:00
Martin Kuba 070b6852a5
LowMemory metrics temporality preference (#3915)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-06-30 11:13:03 -07:00
Andreas Odysseos bb8a4f7ab7
fix(http-intrumentation): prevent request socket null from throwing uncaught error (#3858)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-06-29 14:59:09 +02:00
Mend Renovate b3d57bb295
chore(deps): update lerna monorepo to v7.1.1 (#3956) 2023-06-29 08:49:38 +02:00
Aaron Abbott e2e291c583
fix(sdk-metrics): preserve startTime for cumulative ExponentialHistograms (#3934)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-06-29 08:31:08 +02:00
Marc Pichler 10c3e934cc
fix(selenium-tests): restore tests to functional state (#3923) 2023-06-27 07:08:03 +02:00
粒粒橙 15ede4700b
fix(example-opencensus-shim): avoid OpenCensus auto instrumentations (#3951)
* fix(example-opencensus-shim): avoid opencensus instrumentations being auto imported

* chore: changelog

---------

Co-authored-by: Haddas Bronfman <85441461+haddasbronfman@users.noreply.github.com>
2023-06-26 15:20:53 +03:00
Marc Pichler 4dc8416f9e
fix(exporter-logs-otlp-http): update tsconfigs (#3936) 2023-06-26 11:04:48 +02:00
Mend Renovate a30952cc50
chore(deps): update dependency nightwatch to v3 (#3950) 2023-06-26 10:35:45 +03:00
Mend Renovate 655e373c53
chore(deps): update dependency semver to v7.5.3 (#3942) 2023-06-23 06:55:45 +02:00
Marc Pichler 9977de7924
fix(otlp-proto-exporter-base): add missing type import (#3937) 2023-06-22 16:06:59 +02:00
Marc Pichler 19fb033900
feat(otlp-exporters): bump otlp proto to 0.20.0 (#3932) 2023-06-21 20:26:54 +02:00
Nicolas Hansse 5dc0f6974a
fix(exporter-logs-otlp-http): set useHex to true (#3875) 2023-06-21 14:16:16 +02:00
Nev 74393ac639
feat(minification): Add noEmitHelpers, importHelpers and tslib as a dependency (#3914)
* feat(minification): Add noEmitHelpers, importHelpers and tslib as a dependency

* fix: Lint fixes

* Remove noEmitHelpers as not needed

---------

Co-authored-by: Chengzhong Wu <legendecas@gmail.com>
2023-06-20 19:30:36 +08:00
Mend Renovate 196b6442b9
chore(deps): update dependency markdownlint-cli to v0.35.0 (#3928)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-06-20 13:11:24 +02:00
粒粒橙 f40e3de178
feat(otlp-grpc-exporters): Add support for Unix domain socket endpoints. (#3853)
* feat(otlp-grpc-exporter-base): add support for unix domain socket

* test(otlp-grpc-exporter): add tests

* chore(docs): update docs and changelog

* fix: skip UDS tests on windows

* Update CHANGELOG.md

* fix: add protocol to http test urls

* fix: update tests

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
Co-authored-by: Chengzhong Wu <legendecas@gmail.com>
2023-06-20 18:32:33 +08:00
Marc Pichler 67d4b80665
chore: bump lerna to 7.0.2, add @lerna/legacy-package-management (#3926) 2023-06-20 17:57:51 +08:00
Marc Pichler 5bee444ab6
chore: fix misaligned dependency versions (#3924)
* chore: fix misaligned dependency versions

* chore(otlp-transformer): remove sdk-logs devDependency
2023-06-20 11:29:28 +08:00
Mend Renovate d76f34eef2
chore(deps): update dependency semver to v7.5.2 (#3919) 2023-06-19 11:31:30 +02:00
Mend Renovate dfe6fe8272
chore(deps): update dependency lerna to v6.6.2 (#3885) 2023-06-16 12:51:35 +02:00
Marc Pichler e8f3432bde
chore: add lerna to devDependencies in all packages (#3909) 2023-06-16 12:37:29 +02:00
Mend Renovate 4b2d887cd5
chore(deps): update dependency karma to v6.4.2 (#3911) 2023-06-15 11:18:45 +02:00
Mend Renovate c981558b50
chore(deps): update typescript-eslint monorepo to v5.59.11 (#3910) 2023-06-14 17:48:01 +02:00
Mend Renovate 51fb576c16
chore(deps): update dependency webpack-cli to v4.10.0 (#3907) 2023-06-14 17:28:49 +02:00
Mend Renovate 661b2831e4
chore(deps): update dependency markdownlint-cli to v0.34.0 (#3906)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-06-14 16:40:01 +02:00
Aaron Abbott 5912501043
docs(opencensus-shim) add an example showing how to use the opencensus shim (#3778)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-06-14 16:39:12 +02:00
Mend Renovate b7d2fac77d
chore(deps): update dependency webpack-merge to v5.9.0 (#3904) 2023-06-14 15:12:09 +02:00
Marc Pichler fbb7d72feb
chore(deps): update dependency prettier to v2.8.8 (#3905)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2023-06-14 14:18:20 +02:00
Mend Renovate 5288753c21
chore(deps): update dependency sinon to v15.1.2 (#3900) 2023-06-14 09:06:07 +02:00
Mend Renovate 4bed3c92ff
chore(deps): update dependency dpdm to v3.13.1 (#3898) 2023-06-14 08:41:02 +02:00
Mend Renovate 4f440aa342
chore(deps): update dependency babel-loader to v8.3.0 (#3897) 2023-06-14 08:12:00 +02:00
Mend Renovate 863c8a4081
chore(deps): update dependency @types/semver to v7.5.0 (#3895) 2023-06-14 07:55:54 +02:00
Mend Renovate 65fa45fdef
chore(deps): update babel monorepo (#3891) 2023-06-14 07:10:12 +02:00
Chi Ma 5a1cd99bae
fix(sdk-metrics): Update default Histogram's boundary to match OTEL's spec (#3893) 2023-06-13 16:44:43 +02:00
Mend Renovate 95a5e0cada
chore(deps): update dependency unionfs to v4.5.1 (#3890) 2023-06-13 08:16:47 +02:00
Mend Renovate 75691c92cd
chore(deps): update dependency protobufjs-cli to v1.1.1 (#3889) 2023-06-13 07:50:32 +02:00
Mend Renovate f606404cd7
chore(deps): update dependency memfs to v3.5.3 (#3888) 2023-06-13 07:27:15 +02:00
Mend Renovate 2f472adb93
chore(deps): update dependency chromedriver to v114 (#3849) 2023-06-13 06:55:03 +02:00
Mend Renovate 7fc17e5c45
chore(deps): update actions/checkout action to v3.5.3 (#3883) 2023-06-12 14:36:31 +02:00
Mend Renovate 630e0da2dc
chore(deps): update dependency nock to v13.3.1 (#3884) 2023-06-12 14:05:04 +02:00
粒粒橙 3b387d8f37
fix: align dependency versions (#3847)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-06-12 13:20:02 +02:00
粒粒橙 e8540c5016
chore(instrumentation-grpc): drop support for `grpc` (#3807)
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
2023-06-12 13:10:12 +02:00
粒粒橙 4a7091f2b4
fix(npm-scripts): support windows platform using `cross-var` (#3857) 2023-06-11 01:22:09 +08:00
粒粒橙 228e67b941
chore(otlp-grpc-exporter): update TLS certs and keys for tests (#3878)
* chore(otlp-grpc-exporter): remove unused certs

* chore(otlp-grpc-exporter): update TLS certs and keys for tests
2023-06-08 13:16:38 -04:00
Mend Renovate 51dd6f2ddd
chore(deps): update all patch versions (#3874) 2023-06-08 12:45:34 +03:00
Mend Renovate a2ff4b677d
chore(deps): update dependency mocha to v10.2.0 (#3873) 2023-06-08 10:10:17 +08:00
Marc Pichler 3d7015121c
chore(renovate): improve PR grouping and add @pichlermarc to assignees (#3868)
* chore(renovate): improve PR grouping and add @pichlermarc to assingees

* chore: fix 'compatability' typo
2023-06-07 16:29:39 -04:00
Chengzhong Wu 69da5d548e
chore(deps): update dependency linkinator to v5 (#3866)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-06-07 09:52:13 +02:00
Marc Pichler edebbcc757
chore: prepare release 1.14 / 0.40 (#3854)
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
2023-06-06 07:13:04 +02:00
Abinet18 1fc4ac652f
feat(exporter-logs-otlp-proto): implements protobuf exporter for logs (#3779)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-06-02 09:58:44 +02:00
粒粒橙 05bcd822a9
fix: missing `entryPoints` in tsconfig.json (#3846)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-06-02 08:18:27 +02:00
Abinet18 8eb9bf30a3
feat/logattributes support map type (#3821)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-06-02 07:23:06 +02:00
Marc Pichler a4f0b42f1e
fix(exporter-logs-otlp-grpc): make test server use port 1503 (#3842) 2023-05-31 15:54:39 +02:00
Aaron Abbott 622955a95d
feat(opencensus-shim) add require-in-the-middle hook to patch @opencensus/core (#3809) 2023-05-31 07:54:13 +02:00
Jorge Padilla a8ac8baa51
fix(semantic-conventions): update trace semantic conventions url (#3843) 2023-05-30 08:53:32 +02:00
Marc Pichler 2fb1b3064e
chore(instrumentation-grpc): add 'grpc' deprecation notice postinstall script (#3833) 2023-05-26 21:28:00 +02:00
Marc Pichler 0c12777c98
deps(exporter-logs-otlp-http): remove unused rimraf devDependency (#3840) 2023-05-26 09:11:53 +02:00
Marc Pichler 73d7b6735b
fix(exporter-logs-otlp-http): bump version to 0.39.1 (#3836) 2023-05-25 17:01:14 +02:00
fuaiyi fe82d7b005
feat(exporter-logs-otlp-http): implements otlp-http exporter for logs (#3764)
* feat(exporter-logs-otlp-http): implements otlp-http exporter for logs

* feat(exporter-logs-otlp-http): improve README

* feat(exporter-logs-otlp-http): add browser section in package.json

* feat(exporter-logs-otlp-http): update log-sdk version

* feat(logs-exporter-otlp-http): update version of @opentelemetry/core

* feat(exporter-logs-otlp-http): update README

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-05-25 16:16:47 +02:00
Daniel Dyla c6635fa496
Add Purvi to approvers (#3832) 2023-05-24 12:22:28 -04:00
Daniel Dyla a6635428a9
Add Hector to approvers (#3831) 2023-05-24 12:22:02 -04:00
Daniel Dyla 5fb44c0447
Add Jamie to approvers (#3830) 2023-05-24 12:21:22 -04:00
Hector Hernandez 58dbbb4b89
[sdk-logs] remove includeTraceContext configuration and use LogRecord context when available (#3817)
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
2023-05-23 11:42:16 +02:00
fuaiyi 0471c54a4c
fix(exporter-logs-otlp-grpc): change OTLPLogsExporter to OTLPLogExpo… (#3819) 2023-05-22 10:48:37 +02:00
粒粒橙 de22983c50
feat(api-logs): add `ObservedTimestamp` to `LogRecord` (#3787)
* feat(api-logs): add `ObservedTimestamp` to `LogRecord`

* chore(changelog): add changelog

* fix(sdk-logs): use `Date` instead of `hrTime()` for timestamps

---------

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
2023-05-19 15:13:37 -04:00
Mend Renovate 9fe1f7d8d5
chore(deps): update dependency chromedriver to v113 (#3822) 2023-05-19 14:30:03 -04:00
Daniel Dyla d4a41bd815
Add scripts to prepare releases automatically (#3805) 2023-05-17 23:11:03 +02:00
Jackson Weber fcd75dfda8
feat(opentelemetry-sdk-trace-base): Add optional forceFlush property to SpanExporter interface (#3753)
* feat(opentelemetry-sdk-trace-base): Add optional forceFlush property to SpanExporter interface

Signed-off-by: Sidartha Gracias <sgracias@cisco.com>

* feat(opentelemetry-sdk-trace-base): fixup changelog

Signed-off-by: Sidartha Gracias <sgracias@cisco.com>

* feat(opentelemetry-sdk-trace-base): fixup changelog

Signed-off-by: Sidartha Gracias <sgracias@cisco.com>

* feat(opentelemetry-sdk-trace-base): add exporter forceflush functions

Signed-off-by: Sidartha Gracias <sgracias@cisco.com>

* feat(opentelemetry-sdk-trace-base): add tests, add empty implemtation for downstream exporters

Signed-off-by: Sidartha Gracias <sgracias@cisco.com>

* feat(opentelemetry-sdk-trace-base): add implementation for forceflush for zipkin, jaeger, otlp

* feat(opentelemetry-sdk-trace-base): fix lint, minor review change

* feat(opentelemetry-sdk-trace-base): minor review change

* feat(opentelemetry-sdk-trace-base): fix lint

* feat(opentelemetry-sdk-trace-base): minor change

* Fix lint.

* Have the SimpleSpanProcessor handle force flush.

* Update changelog.

* Update the span processor to call forceFlush in the exporter.

* Fix lint.

* Make the forceFlush method optional.

* fix(changelog): replace mandatory -> optional

* Add or update the Azure App Service build and deployment workflow config

* Delete issue_3067_jacksonweber-test-github.yml

* Add comment for ignoring resolved values.

---------

Signed-off-by: Sidartha Gracias <sgracias@cisco.com>
Co-authored-by: Sidartha Gracias <sgracias@cisco.com>
Co-authored-by: Sidartha Gracias <97981532+sgracias1@users.noreply.github.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-05-17 16:07:26 -04:00
Mend Renovate 17eca4c792
fix(deps): update dependency require-in-the-middle to v7 (#3782)
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
2023-05-17 11:57:17 -04:00
Aaron Abbott 18ea3df2b7
chore(changelog): combine accidental multiple enhancement sections into one (#3815) 2023-05-17 11:56:23 -04:00
Mend Renovate c3feabe4e7
fix(deps): update dependency axios to v1 (#3299)
* fix(deps): update dependency axios to v1

* fix(deps): update dependency axios to v1

* Fix types

---------

Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
2023-05-17 10:06:12 -04:00
Mend Renovate 81ee1df218
chore(deps): update node.js to v20 (#3768)
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
2023-05-17 09:18:40 -04:00
Jamie Danielson 6a876a053f
feat(otlp-metric-exporters): Add User-Agent header to OTLP metric exporters (#3806)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-05-17 07:22:27 +02:00
Aaron Abbott 68eba71191
feat(opencensus-shim) add ShimTracer and ShimSpan implementations (#3756)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-05-16 08:01:38 +02:00
Amir Blum 2531263948
fix(sdk-node): use resource interface instead of concrete class (#3803) 2023-05-15 20:38:44 +02:00
Jamie Danielson 758c7af0c1
feat(otlp-trace-exporters): Add User-Agent header to OTLP trace exporters (#3790)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-05-15 11:14:12 +02:00
Jamie Danielson 422a36ae12
feat: ESM support for instrumentation (#3698)
Co-authored-by: Purvi Kanal <kanal.purvi@gmail.com>
Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>
Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
Co-authored-by: Purvi Kanal <purvikanal@honeycomb.io>
2023-05-15 10:30:52 +02:00
Marc Pichler bba09c0e5a
chore: release 0.39.1 (#3800) 2023-05-12 15:01:36 +02:00
Marc Pichler 29c46ef5ce
fix(otlp-transformer): move api-logs to dependencies (#3798) 2023-05-12 11:12:42 +02:00
Marc Pichler 8fc7689659
chore: release 1.13 / 0.39 (#3776) 2023-05-11 15:08:45 +02:00
Gerhard Stöbich 32632bd303
doc(instrumentation): add limitiations section to readme (#3786)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-05-11 10:21:23 +02:00
Aaron Abbott b8b6308386
chore: remove "opentelemetry" prefix from opencensus-shim package directory (#3784) 2023-05-09 07:04:46 +02:00
Aaron Abbott 7255da994f
feat(opencensus-shim) add mapping logic and propagation shim (#3751) 2023-05-05 08:16:46 +02:00
Trent Mick 32ae641ad1
fix(deps): update dependency require-in-the-middle to v7.1.0 for types and named export (#3727)
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
2023-05-02 09:43:13 +02:00
Marc Pichler 2f1e316484
feat(otlp-grpc-exporter-base): use statically generated protobuf code (#3705)
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
2023-04-28 12:58:20 +02:00
粒粒橙 abfb1bb68e
refactor(otlp-transformer): refine metrics transformer (#3770) 2023-04-28 12:28:52 +02:00
粒粒橙 a96116db88
deps: remove `rimraf` (#3769) 2023-04-28 10:25:32 +02:00
粒粒橙 98e4e821bc
feat(exporter-logs-otlp-grpc): implements otlp-grpc exporters for logs (#3712)
Co-authored-by: Martin Kuba <martin@martinkuba.com>
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-04-26 11:05:21 +02:00
Simen Bekkhus 9347ca6a3e
fix(http): stop listening to `request`'s `close` event once it has emitted `response` (#3625)
Co-authored-by: Chengzhong Wu <chengzhong.wcz@alibaba-inc.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-04-26 15:41:43 +08:00
Aaron Abbott 6676414505
feat(opencensus-shim): add OpenCensus shim package boilerplate (#3750)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
2023-04-25 07:11:38 +02:00
Marc Pichler cd0d8806e0
fix(sdk-node): lazy require @opentelemetry/exporter-jaeger (#3739)
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
2023-04-24 10:55:57 +02:00
Martin Kuba de354dbbdd
fix: VisibilityState type for typescript >4.6 (#3741)
Co-authored-by: Nev <54870357+MSNev@users.noreply.github.com>
2023-04-20 11:02:52 +02:00
Daniel Dyla 61aae103f3
Fix changelog link (#3744) 2023-04-19 11:32:12 +02:00
Trent Mick 3e99e13a4e
fix(instrumentation): update dep require-in-the-middle to 7.0.1 (#3743) 2023-04-19 10:08:07 +02:00
Marc Pichler 1b50f91850
deps(sdk-logs): remove unused rimraf dev dependency (#3738) 2023-04-18 10:23:32 +02:00
Marc Pichler 5b9534bd47
deps: remove unused mkdirp and rimraf dependencies (#3737) 2023-04-18 06:50:54 +02:00
Daniel Dyla 053acb604c
Logs version fixup (#3729)
* Logs version fixup

* Fix changelog

* Fix changelog
2023-04-13 15:35:23 -04:00
Daniel Dyla a04090010e
chore: release proposal 1.12 / 0.38 (#3725)
* chore: release proposal 1.12 / 0.38

* changelog

* lint
2023-04-13 12:39:56 -04:00
fuaiyi a31b38a845
Logs SDK (#3549)
* feat(sdk-logs): sdk-logs init

* feat(sdk-logs): sdk-logs init

* feat(sdk-logs): sdk-logs init

* feat(sdk-logs): sdk-logs init

* feat(sdk-logs): sdk-logs init

* feat(sdk-logs): sdk-logs init

* feat(sdk-logs): sdk-logs init

* fix compile errors

* feat(sdk-logs): sdk-logs init

* feat(sdk-logs): sdk-logs init

* feat(sdk-logs): sdk-logs init

* feat(sdk-logs): sdk-logs init

* feat(sdk-logs): sdk-logs init

* feat(sdk-logs): sdk-logs init

* feat(sdk-logs): sdk-logs init

* feat(sdk-logs): sdk-logs init

* feat(sdk-logs): sdk-logs init

* feat(sdk-logs): sdk-logs init

* feat(sdk-logs): sdk-logs init

* feat(sdk-logs): add browser test config

* feat: add test-utils compatible assert.rejects

* feat(sdk-logs): fix writing errors in README

* feat(sdk-logs): update version to 0.36.1

* feat(sdk-logs): add examples

* feat(sdk-logs): fix LogRecord default timestamp to Date.now()

* feat(sdk-logs): logRecord support rewrite time/body/severityNumber/newSeverityText

* feat(sdk-logs): add logs processor environments

* feat(sdk-logs): modify export style

* feat(sdk-logs): update version to 0.36.1

* feat(sdk-logs): remove exporter factory

* feat(sdk-logs): update CHANGELOG

* feat(sdk-logs): change the processing of schemeUrl

* feat(sdk-logs): split LoggerProviderConfig and LoggerConfig

* feat(sdk-logs): getLogger with default name  when name is invalid

* feat(sdk-logs): improve the shutdown logic of LoggerProvider

* feat(sdk-logs): improve the shutdown logic of LoggerProvider

* feat(sdk-logs): make log record read-only after it has been emitted

* feat(sdk-logs): logger option support includeTraceContext & LogRecordProcessor onEmit suport context

* feat(sdk-logs): update version

* feat(sdk-logs): update version

* feat(sdk-logs): update logs example with typescript

* feat(sdk-logs): update peerDependencies

* feat(sdk-logs): peer-api-check support @opentelemetry/api-logs

* feat(sdk-logs): update peerDependencies

---------

Co-authored-by: Martin Kuba <martin@martinkuba.com>
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
2023-04-13 08:41:19 -04:00
Marc Pichler 26dfc70841
fix(sdk-node)!: remove unused defaultAttributes option (#3724) 2023-04-13 11:31:29 +02:00
Grunet 9945c4bb14
fix(opentelemetry-sdk-trace-web): don't crash in runtimes where location isn't defined (#3715)
* fix(opentelemetry-sdk-trace-web): don't crash in runtimes where location isn't defined

* chore: updated changelog

* chore(opentelemetry-sdk-trace-web): fix linter issues

* fix(opentelemetry-sdk-trace-web): Remove broken test and replace with comment

---------

Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
2023-04-12 11:44:20 -04:00
Mend Renovate 93285585ce
chore(deps): update dependency chromedriver to v112 (#3718) 2023-04-07 13:52:27 -04:00
Daniel Dyla 65b2b79b13
Log name and ID on span end misuse (#3716)
* Log name and ID on span end misuse

* Changelog

* lint
2023-04-05 13:56:56 -04:00
Pierre Tessier 73da976982
fix(instrumentation-http): use semantic convention metric descriptions (#3710) 2023-04-04 11:27:53 +02:00
Valentin Marchaud 4b04407ba3
chore: move vmarchaud to emeriti (#3709) 2023-03-31 15:47:30 -04:00
1293 changed files with 143107 additions and 32526 deletions

View File

@ -5,38 +5,61 @@ body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
Please make sure to fill out the entire form below,
providing as much context as you can in order to help us
triage and track down your bug as quickly as possible.
> [!IMPORTANT]
> **Please read all parts of this form carefully.** By following the instructions carefully, you ensure that we
> can get started fixing your bug, instead of being stuck at trying to reproduce your issue. Please provide
> all requested information, even if you think it does not apply to your problem.
>
> **If you use a third-party package that re-distributes OpenTelemetry, open the bug ticket with that third party unless you can provide steps to reproduce this with pure OpenTelemetry.**
> Digging into third-party distributions of OpenTelemetry is not in scope for this project.
Before filing a bug, please be sure you have searched through
[existing bugs](https://github.com/open-telemetry/opentelemetry-js/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Abug)
to see if your bug is already addressed.
If your bug is related to an instrumentation or plugin in [opentelemetry-js-contrib](https://github.com/open-telemetry/opentelemetry-js-contrib)
please be sure to file it there.
Before filing a bug, please be sure you have searched through [existing open bugs](https://github.com/open-telemetry/opentelemetry-js/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Abug)
to see if this bug has already been filed.
- type: markdown
attributes:
value: |
## Bug Reproduction
- type: textarea
attributes:
label: What happened?
description: Please provide as much detail as you reasonably can.
description: |
> [!IMPORTANT]
> **Please provide as much detail as you reasonably can.**
> We all know the complexities of developing with JavaScript/TypeScript. **Be specific** about your setup and **DO NOT** assume that the person handling your bug report knows how to use your specific combination of tooling. Always provide build instructions and config files.
value: |
## Steps to Reproduce
<!--
The most effective way to solve a bug is to provide a link to a reproducer repository. It is extremely difficult to exactly reproduce problems
and doing so can take multiple hours for us. You know your tooling and setup and we know OpenTelemetry JavaScript internals.
Let's help each other! :)
-->
## Expected Result
## Actual Result
## Additional Details
<!--
Anything you can think of that will help us reproduce and understand your problem:
- details about the behavior of the bug
- code to reproduce, if not provided via a repository above (including setting up any frameworks you may be using, we likely don't use the same tech-stack that you're using on the daily)
- which tooling you use and how you're using it
- config files for your tooling (typescript, bundlers, ...)
- how you run your code (example: `node -r otel.js ./index.js`).
- which module type you are you using (`module` or `commonjs`)
-->
validations:
required: true
- type: textarea
attributes:
label: OpenTelemetry Setup Code
description: Please provide the code you use to set up OpenTelemetry
description: |
Please provide the code you use to set up OpenTelemetry.
If you use `@opentelemetry/auto-instrumentations-node/register`, please state so here.
You may omit this step if you have provided a reproducer repository.
placeholder: | # This comes from our README.md
// tracing.js
// otel.js
'use strict'
@ -44,15 +67,15 @@ body:
const opentelemetry = require('@opentelemetry/sdk-node');
const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node');
const { ConsoleSpanExporter } = require('@opentelemetry/sdk-trace-base');
const { Resource } = require('@opentelemetry/resources');
const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions');
const { resourceFromAttributes } = require('@opentelemetry/resources');
const { ATTR_SERVICE_NAME } = require('@opentelemetry/semantic-conventions');
// configure the SDK to export telemetry data to the console
// enable all auto-instrumentations from the meta package
const traceExporter = new ConsoleSpanExporter();
const sdk = new opentelemetry.NodeSDK({
resource: new Resource({
[SemanticResourceAttributes.SERVICE_NAME]: 'my-service',
resource: resourceFromAttributes({
[ATTR_SERVICE_NAME]: 'my-service',
}),
traceExporter,
instrumentations: [getNodeAutoInstrumentations()]
@ -75,13 +98,15 @@ body:
- type: textarea
attributes:
label: package.json
description: If possible, please provide your full package.json. If not, please provide at least your list of dependencies and their versions, especially OpenTelemetry versions.
description: |
Please provide your the full package.json needed to reproduce the issue.
You may omit this step if you provided a reproducer repository.
render: "JSON"
placeholder: |
{
"name": "my-app",
"scripts": {
"start": "node -r tracing.js app.js"
"start": "node -r otel.js app.js"
},
"dependencies": {
"@opentelemetry/api": "^1.3.0",
@ -95,3 +120,20 @@ body:
description: |
Please copy and paste any relevant log output.
render: shell
- type: markdown
attributes:
value: |
## System Details
System Details help us when we cannot reproduce your problem with the information provided above. Sometimes bugs only surface on specific platforms and runtime versions.
- type: textarea
attributes:
label: Operating System and Version
placeholder: Ubuntu 24.04, Windows 11 Build 26100.2033, macOS 15.0.1
validations:
required: false
- type: textarea
attributes:
label: Runtime and Version
placeholder: Node.js v20.12.1, Node.js v18.18.2, Firefox 130, Chrome 132, ...
validations:
required: false

View File

@ -7,7 +7,7 @@ Before creating a pull request, please make sure:
- You have read the guide for contributing
- See https://github.com/open-telemetry/opentelemetry-js/blob/main/CONTRIBUTING.md
- You signed all your commits (otherwise we won't be able to merge the PR)
- See https://github.com/open-telemetry/community/blob/master/CONTRIBUTING.md#sign-the-cla
- See https://github.com/open-telemetry/community/blob/main/guides/contributor#sign-the-cla
- You added unit tests for the new functionality
- You mention in the PR description which issue it is addressing, e.g. "Fixes #xxx". This will auto-close
the issue that your PR fixes (if such)

View File

@ -10,8 +10,8 @@ No changes
## Collaborators and Teams
* There is currently no `javascript-triagers` role
* `javascript-maintainers` has `Admin` permission
- There is currently no `javascript-triagers` role
- `javascript-maintainers` has `Admin` permission
## Branches
@ -19,13 +19,13 @@ No changes
### `main`
* Uncheck "Restrict who can push to matching branches"
* Check "Require merge queue"
* Build concurrency: 5
* Minimum pull requests to merge: 1 or after 5 minutes
* Maximum pull requests to merge: 5
* Check "Only merge non-failing pull requests"
* Status check timeout: 60 minutes
- Uncheck "Restrict who can push to matching branches"
- Check "Require merge queue"
- Build concurrency: 5
- Minimum pull requests to merge: 1 or after 5 minutes
- Maximum pull requests to merge: 5
- Check "Only merge non-failing pull requests"
- Status check timeout: 60 minutes
### `dependabot/**/**`
@ -36,10 +36,10 @@ Our dependencies are managed by a bot which creates PRs from a fork.
This is a special branch which we use to publish the automatically generated docs.
It is exempt from most protections.
* "Allow force pushes from everyone" (requires write permission)
- "Allow force pushes from everyone" (requires write permission)
## Pages
* Source: Deploy from a branch
* Branch: `gh-pages` `/ (root)`
- Source: Deploy from a branch
- Branch: `gh-pages` `/ (root)`

55
.github/workflows/benchmark.yml vendored Normal file
View File

@ -0,0 +1,55 @@
name: Benchmark Tests
on:
push:
branches: [ main ]
permissions:
contents: read
jobs:
benchmark-tests:
permissions:
contents: write # required for pushing benchmark results to gh-pages
strategy:
fail-fast: false
matrix:
node_version:
- "22"
runs-on: equinix-bare-metal
timeout-minutes: 10
env:
NPM_CONFIG_UNSAFE_PERM: true
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: ${{ matrix.node_version }}
- run: npm install -g npm@latest
- name: Bootstrap
run: npm ci
- name: Build 🔧
run: npm run compile
- name: Benchmark tests
run: |
npm run test:bench
find . -name .benchmark-results.txt -exec cat {} + > combined_benchmarks.txt
- name: Store benchmark results
uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'benchmarkjs'
output-file-path: combined_benchmarks.txt
gh-pages-branch: gh-pages
github-token: ${{ secrets.GITHUB_TOKEN }}
benchmark-data-dir-path: "benchmarks"
auto-push: true

View File

@ -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.
@ -9,13 +9,16 @@ on:
types: [opened, synchronize, reopened, labeled, unlabeled]
branches:
- main
- next
permissions:
contents: read
jobs:
changelog:
runs-on: ubuntu-latest
if: ${{ !contains(github.event.pull_request.labels.*.name, 'dependencies') && !contains(github.event.pull_request.labels.*.name, 'Skip Changelog')}}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Check for CHANGELOG changes
run: |

View File

@ -3,11 +3,17 @@ on:
schedule:
- cron: '30 6 * * 1'
permissions:
contents: read
jobs:
stale:
permissions:
issues: write # required for closing stale issues
pull-requests: write # required for closing stale PRs
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
- uses: actions/stale@v9
with:
days-before-stale: 60
days-before-close: 14

View File

@ -2,34 +2,31 @@ name: "CodeQL Analysis"
on:
workflow_dispatch:
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
- cron: '30 1 * * *'
push:
branches: [ main ]
pull_request:
permissions:
contents: read
jobs:
CodeQL-Build:
permissions:
security-events: write
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: javascript
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3

View File

@ -0,0 +1,65 @@
name: Create or Update Release PR
on:
workflow_dispatch:
inputs:
release_type:
type: choice
description: Release type
options:
- patch
- minor
release_scope:
type: choice
description: Release Scope
options:
- experimental # all packages in experimental/packages
- sdk # all SDK packages, experimental and stable, excluding semantic conventions
- all # all release packages, including API, excluding semconv
- semconv # only semantic convention package
permissions:
contents: read
jobs:
create-or-update-release-pr:
runs-on: ubuntu-latest
steps:
- name: Fork
run: gh repo fork open-telemetry/opentelemetry-js
env:
GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v4
with:
repository: opentelemetrybot/opentelemetry-js
ref: main
token: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
- name: Sync with upstream
run: |
git remote show origin
git remote add upstream https://github.com/open-telemetry/opentelemetry-js.git
git fetch upstream
git reset --hard upstream/main
git push origin main --force
- uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: package-lock.json
node-version: 22
- run: npm install -g npm@latest
- run: npm ci
- name: Create/Update Release PR
run: |
git config user.name opentelemetrybot
git config user.email 107717825+opentelemetrybot@users.noreply.github.com
npm run github:create_or_update_release_pr
env:
GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
RELEASE_SCOPE: ${{ github.event.inputs.release_scope }}
RELEASE_KIND: ${{ github.event.inputs.release_scope }}:${{ github.event.inputs.release_type }}
RELEASE_PR_REMOTE: origin
RELEASE_PR_OWNER: opentelemetrybot

View File

@ -4,42 +4,28 @@ on:
release:
types: [published]
permissions:
contents: read
jobs:
build-and-deploy:
permissions:
contents: write # required for deploying documentation to gh-pages
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '14'
- name: restore lock files
uses: actions/cache@master # must use unreleased master to cache multiple paths
id: cache
with:
# must be done before bootstrap to not include node_modules files in the cache paths
path: |
cache: 'npm'
cache-dependency-path: |
package-lock.json
packages/*/package-lock.json
backwards-compatability/*/package-lock.json
metapackages/*/package-lock.json
packages/*/package-lock.json
integration-tests/*/package-lock.json
key: ${{ runner.os }}-unit_test-${{ matrix.node_version }}-${{ hashFiles('**/package.json') }}
- name: Install and Build (cache miss) 🔧
if: steps.cache.outputs.cache-hit != 'true'
run: |
npm install --ignore-scripts
npx lerna bootstrap --no-ci --hoist --nohoist='zone.js'
npm run compile
node-version: '22'
- name: Install and Build (cache hit) 🔧
if: steps.cache.outputs.cache-hit == 'true'
- name: Install and Build 🔧
run: |
npm ci --ignore-scripts
npx lerna bootstrap --hoist --nohoist='zone.js'
npm ci
npm run compile
- name: Build Docs
@ -48,8 +34,10 @@ jobs:
NODE_OPTIONS: --max-old-space-size=6144
- name: Deploy Documentation 🚀
uses: JamesIves/github-pages-deploy-action@releases/v3
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: docs # The folder the action should deploy.
branch: gh-pages # The branch the action should deploy to.
folder: docs # The folder the action should deploy.
# ensure we don't override benchmark data
clean-exclude: |
benchmarks/**

76
.github/workflows/e2e.yml vendored Normal file
View File

@ -0,0 +1,76 @@
name: E2E Tests
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
e2e-tests:
strategy:
fail-fast: false
matrix:
node_version:
- "18.19.0"
- "18"
- "20.6.0"
- "20"
- "22"
- "23"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: ${{ matrix.node_version }}
# npm@11.0.0 drops support for Node.js v18
# Install the latest npm compatible with this version of Node.js
# - npm@11.1.0 supports: {"node":"^20.17.0 || >=22.9.0"}
- run: npm install -g npm@"<11.0.0"
if: ${{
matrix.node_version == '18.19.0' ||
matrix.node_version == '18' ||
matrix.node_version == '20.6.0'
}}
- run: npm install -g npm@latest
if: ${{
matrix.node_version == '20' ||
matrix.node_version == '22' ||
matrix.node_version == '23'
}}
- name: Bootstrap
run: npm ci
- name: Build 🔧
run: npm run compile
- name: Install collector
run: |
curl -sSL -o otelcol-contrib.tar.gz https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.126.0/otelcol-contrib_0.126.0_linux_amd64.tar.gz
tar -xzf otelcol-contrib.tar.gz
working-directory: e2e-tests
- name: run collector in background
run: |
./otelcol-contrib --config collector-config.yaml &
working-directory: e2e-tests
- name: Export telemetry to collector
run: npm run export-telemetry
working-directory: e2e-tests
- name: stop collector
run: pkill -f otelcol-contrib
working-directory: e2e-tests
- name: Print output
run: cat collector-output.json
working-directory: e2e-tests
- name: verify exported telemetry
run: npm run verify
working-directory: e2e-tests

20
.github/workflows/fossa.yml vendored Normal file
View File

@ -0,0 +1,20 @@
name: FOSSA scanning
on:
push:
branches:
- main
permissions:
contents: read
jobs:
fossa:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: fossas/fossa-action@93a52ecf7c3ac7eb40f5de77fd69b1a19524de94 # v1.5.0
with:
api-key: ${{secrets.FOSSA_API_KEY}}
team: OpenTelemetry

View File

@ -7,51 +7,25 @@ on:
pull_request:
merge_group:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '14'
- uses: actions/checkout@v3
- name: Lint changelog file
uses: avto-dev/markdown-lint@v1
with:
# Commenting due to
# https://github.com/avto-dev/markdown-lint/blob/aab9be9823fcd706f6da3e6ad6c64874c23fbd4c/lint/rules/changelog.js#L51-L71
# TODO: adhere to, or overwrite above rule and uncomment rules
# rules: "/lint/rules/changelog.js"
config: "/lint/config/changelog.yml"
args: "./CHANGELOG.md"
- name: Lint markdown files
uses: avto-dev/markdown-lint@v1
with:
args: "./**/*.md"
ignore: './CHANGELOG.md ./experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/protos ./experimental/packages/opentelemetry-exporter-metrics-otlp-proto/protos ./packages/exporter-trace-otlp-grpc/protos ./packages/exporter-trace-otlp-proto/protos'
- name: restore lerna
id: cache
uses: actions/cache@v3
with:
path: |
node_modules
cache: 'npm'
cache-dependency-path: |
package-lock.json
packages/*/node_modules
packages/*/package-lock.json
experimental/packages/*/node_modules
experimental/packages/*/package-lock.json
key: lint-${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('package.json', 'packages/*/package.json', 'experimental/packages/*/package.json') }}-04142022
node-version: '22'
# On a cache miss, install dependencies
- name: Bootstrap
run: |
npm install --ignore-scripts
npx lerna bootstrap --no-ci --hoist --nohoist='zone.js'
run: npm ci
- name: Lint
run: |

47
.github/workflows/ossf-scorecard.yml vendored Normal file
View File

@ -0,0 +1,47 @@
name: OSSF Scorecard
on:
push:
branches:
- main
schedule:
- cron: "44 18 * * 6" # once a week
workflow_dispatch:
permissions: read-all
jobs:
analysis:
runs-on: ubuntu-latest
permissions:
# Needed for Code scanning upload
security-events: write
# Needed for GitHub OIDC token if publish_results is true
id-token: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
with:
results_file: results.sarif
results_format: sarif
publish_results: true
# Upload the results as artifacts (optional). Commenting out will disable
# uploads of run results in SARIF format to the repository Actions tab.
# https://docs.github.com/en/actions/advanced-guides/storing-workflow-data-as-artifacts
- name: "Upload artifact"
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: SARIF file
path: results.sarif
retention-days: 5
# Upload the results to GitHub's code scanning dashboard (optional).
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
with:
sarif_file: results.sarif

View File

@ -7,20 +7,23 @@ on:
pull_request:
merge_group:
permissions:
contents: read
jobs:
peer-api-check:
runs-on: ubuntu-latest
container:
image: node:18
image: node:22
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install lerna
run: npm install -g lerna
run: npm install -g lerna@6.6.2
- name: Install semver
run: npm install semver
run: npm install -g semver
- name: Check API dependency semantics
working-directory: packages

44
.github/workflows/publish-to-npm.yml vendored Normal file
View File

@ -0,0 +1,44 @@
name: Publish packages to NPM
on:
workflow_dispatch:
permissions:
contents: read
jobs:
release-to-npm:
runs-on: ubuntu-latest
permissions:
# needed for NPM provenance
id-token: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- run: npm ci
# NOTE: in the past, we've had situations where the compiled files were missing as the `prepublishOnly` script was
# missing in some packages. `npx lerna publish` *should* also run compile, but this is intended as a safeguard
# when that does not happen for whatever reason.
- run: npm run compile
- name: Publish to npm
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NPM_CONFIG_PROVENANCE: true
# NOTE: using --concurrency 1 to reduce the likelihood of a race when publishing,
# which happens when the npm registry is not fully consistent yet. This can cause the publishing of a package to be
# rejected because dependencies are not available yet. `lerna` does ensure that this is not the case locally
# (packages are in-fact published in the correct order), but the race on the registry still applies.
# If this happens, run the workflow again - there should be enough time for everything to settle until this workflow
# attempts to publish again.
run: npx lerna publish --concurrency 1 from-package --no-push --no-private --no-git-tag-version --no-verify-access --dist-tag=latest --yes

79
.github/workflows/sbom.yml vendored Normal file
View File

@ -0,0 +1,79 @@
name: SBOM
on:
release:
types: [published]
permissions: read-all
jobs:
generate-sboms:
runs-on: ubuntu-latest
env:
NPM_CONFIG_UNSAFE_PERM: true
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install -g npm@latest
- name: Bootstrap
run: npm ci
- name: Generate SBOM for core packages
if: ${{ ! startsWith(github.ref, 'refs/tags/experimental') && ! startsWith(github.ref, 'refs/tags/api') }}
run: |
for dir in $(find packages -mindepth 1 -maxdepth 1 -type d)
do
dir_name=$(basename "$dir")
echo "Generating SBOM for $dir_name"
npm sbom --sbom-format=spdx --legacy-peer-deps --workspace ${dir} > "opentelemetry-js_${dir_name}.spdx.json"
done
- name: Generate SBOM for the API package
if: startsWith(github.ref, 'refs/tags/api/')
run: |
npm sbom --sbom-format=spdx --legacy-peer-deps --workspace api > opentelemetry-js_api.spdx.json
- name: Generate SBOMs for experimental packages
if: startsWith(github.ref, 'refs/tags/experimental/')
run: |
for dir in $(find experimental/packages -mindepth 1 -maxdepth 1 -type d)
do
dir_name=$(basename "$dir")
echo "Generating SBOM for $dir_name"
npm sbom --sbom-format=spdx --legacy-peer-deps --workspace ${dir} > "opentelemetry-js_${dir_name}.spdx.json"
done
- name: Zip all SBOM files
run: |
zip sbom.zip *.spdx.json
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: SBOM.zip
path: ./sbom.zip
add-release-artifact:
needs: generate-sboms
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download artifact from generate-sboms
uses: actions/download-artifact@v4
with:
name: SBOM.zip
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./sbom.zip
asset_name: SBOM.zip
asset_content_type: application/zip

View File

@ -0,0 +1,44 @@
name: Survey on Merged PR by Non-Member
on:
pull_request_target:
types: [closed]
permissions:
contents: read
env:
PR_NUM: ${{ github.event.pull_request.number }}
SURVEY_URL: https://docs.google.com/forms/d/e/1FAIpQLSf2FfCsW-DimeWzdQgfl0KDzT2UEAqu69_f7F2BVPSxVae1cQ/viewform?entry.1540511742=open-telemetry/opentelemetry-js
jobs:
comment-on-pr:
name: Add survey to PR if author is not a member
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
if: github.event.pull_request.merged == true
steps:
- uses: actions/checkout@v4
- name: Check if user is a member of the org
id: check-membership
run: |
USERNAME=$(jq -r '.pull_request.user.login' "$GITHUB_EVENT_PATH")
ORG="${{ github.repository_owner }}"
STATUS=$(gh api "orgs/$ORG/members/$USERNAME" --silent && echo "true" || echo "false")
if [[ "$STATUS" == "true" ]]; then
echo "MEMBER_FOUND=true" >> $GITHUB_ENV
else
echo "MEMBER_FOUND=false" >> $GITHUB_ENV
fi
env:
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
- name: Add comment to PR if author is not a member
if: env.MEMBER_FOUND == 'false'
run: |
USERNAME=$(jq -r '.pull_request.user.login' "$GITHUB_EVENT_PATH")
gh pr comment ${PR_NUM} --repo open-telemetry/opentelemetry-js --body "Thank you for your contribution @${USERNAME}! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this [survey](${SURVEY_URL})."
env:
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}

View File

@ -6,91 +6,93 @@ on:
pull_request:
merge_group:
permissions:
contents: read
jobs:
node-tests:
strategy:
fail-fast: false
matrix:
node_version:
- "14"
- "16"
- "18.19.0"
- "18"
- "20.6.0"
- "20"
- "22"
- "23"
- "24"
runs-on: ubuntu-latest
env:
NPM_CONFIG_UNSAFE_PERM: true
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: ${{ matrix.node_version }}
# npm@11.0.0 drops support for Node.js v18
# Install the latest npm compatible with this version of Node.js
# - npm@11.1.0 supports: {"node":"^20.17.0 || >=22.9.0"}
- run: npm install -g npm@"<11.0.0"
if: ${{
matrix.node_version == '18.19.0' ||
matrix.node_version == '18' ||
matrix.node_version == '20.6.0'
}}
- run: npm install -g npm@latest
- name: restore lerna
id: cache
uses: actions/cache@v3
with:
path: |
node_modules
package-lock.json
packages/*/node_modules
packages/*/package-lock.json
experimental/packages/*/node_modules
experimental/packages/*/package-lock.json
key: node-tests-${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('package.json', 'packages/*/package.json', 'experimental/packages/*/package.json') }}-04292022
if: ${{
matrix.node_version == '20' ||
matrix.node_version == '22' ||
matrix.node_version == '23' ||
matrix.node_version == '24'
}}
- name: Bootstrap
run: |
npm install --ignore-scripts
npx lerna bootstrap --no-ci --hoist --nohoist='zone.js' --ignore @opentelemetry/selenium-tests
run: npm ci
- name: Build 🔧
run: |
npm run compile
run: npm run compile
- run: npm test
if: ${{ matrix.node_version != '23' && matrix.node_version != '24' }}
# Node.js >= 23 type stripping conflicts with mocha usage of ts-node.
# See https://github.com/open-telemetry/opentelemetry-js/issues/5415
- run: npm test
env:
NODE_OPTIONS: '--no-experimental-strip-types'
if: ${{ matrix.node_version == '23' || matrix.node_version == '24' }}
- name: Unit tests
run: |
# TODO(legendecas): webpack https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported
if [ "${{ matrix.node_version }}" = "18" ]; then
export NODE_OPTIONS=--openssl-legacy-provider
fi
npm run test
- name: Report Coverage
run: npm run codecov
if: ${{ matrix.node_version == '14' }}
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
verbose: true
node-windows-tests:
runs-on: windows-latest
env:
NPM_CONFIG_UNSAFE_PERM: true
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '16'
cache: 'npm'
cache-dependency-path: |
package-lock.json
node-version: '22'
- run: npm install -g npm@latest
- name: restore lerna
id: cache
uses: actions/cache@v3
with:
path: |
node_modules
package-lock.json
packages/*/node_modules
packages/*/package-lock.json
experimental/packages/*/node_modules
experimental/packages/*/package-lock.json
key: node-windows-tests-${{ runner.os }}-${{ hashFiles('package.json', 'packages/*/package.json', 'experimental/packages/*/package.json') }}
- name: Bootstrap
run: |
npm install --ignore-scripts
npx lerna bootstrap --no-ci --hoist --nohoist='zone.js' --ignore @opentelemetry/selenium-tests
run: npm ci
- name: Build 🔧
run: |
@ -105,100 +107,54 @@ jobs:
NPM_CONFIG_UNSAFE_PERM: true
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 16
- name: restore lerna
id: cache
uses: actions/cache@v3
with:
path: |
node_modules
cache: 'npm'
cache-dependency-path: |
package-lock.json
packages/*/node_modules
packages/*/package-lock.json
experimental/packages/*/node_modules
experimental/packages/*/package-lock.json
key: browser-tests-${{ runner.os }}-${{ hashFiles('package.json', 'packages/*/package.json', 'experimental/packages/*/package.json') }}-04292022
node-version: 22
- name: Bootstrap
run: |
npm install --ignore-scripts
npx lerna bootstrap --no-ci --hoist --nohoist='zone.js' --ignore @opentelemetry/selenium-tests
run: npm ci
- name: Build 🔧
run: |
npm run compile
run: npm run compile
- name: Unit tests
run: npm run test:browser
- name: Report Coverage
run: npm run codecov:browser
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
verbose: true
webworker-tests:
runs-on: ubuntu-latest
env:
NPM_CONFIG_UNSAFE_PERM: true
steps:
- name: Checkout
uses: actions/checkout@v3.0.2
- uses: actions/setup-node@v3
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
- name: restore lerna
id: cache
uses: actions/cache@v3
with:
path: |
node_modules
cache: 'npm'
cache-dependency-path: |
package-lock.json
packages/*/node_modules
packages/*/package-lock.json
experimental/packages/*/node_modules
experimental/packages/*/package-lock.json
key: webworker-tests-${{ runner.os }}-${{ hashFiles('package.json', 'packages/*/package.json', 'experimental/packages/*/package.json') }}-04292022
node-version: 22
- name: Bootstrap
run: |
npm install --ignore-scripts
npx lerna bootstrap --no-ci --hoist --nohoist='zone.js'
run: npm ci
- name: Build 🔧
run: |
npm run compile
run: npm run compile
- name: Unit tests
run: npm run test:webworker
- name: Report Coverage
run: npm run codecov:webworker
api-eol-node-test:
strategy:
fail-fast: false
matrix:
node_version:
- "8"
- "10"
- "12"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
node-version: ${{ matrix.node_version }}
- name: Build
working-directory: ./api
run: |
npm install --ignore-scripts
npm install @types/mocha@^7 mocha@^7 ts-loader@^8 ts-mocha@^8
node ../scripts/version-update.js
npx tsc --build tsconfig.json tsconfig.esm.json
- name: Test
working-directory: ./api
run: npm test
verbose: true

View File

@ -7,44 +7,28 @@ on:
pull_request:
merge_group:
permissions:
contents: read
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '16'
- name: restore lock files
uses: actions/cache@master # must use unreleased master to cache multiple paths
id: cache
with:
# must be done before bootstrap to not include node_modules files in the cache paths
path: |
cache: 'npm'
cache-dependency-path: |
package-lock.json
packages/*/package-lock.json
metapackages/*/package-lock.json
packages/*/package-lock.json
integration-tests/*/package-lock.json
key: ${{ runner.os }}-w3c_integration-${{ hashFiles('**/package.json') }}
node-version: 18
- name: Install and Bootstrap (cache miss) 🔧
if: steps.cache.outputs.cache-hit != 'true'
run: |
npm install --ignore-scripts
npx lerna bootstrap --no-ci --hoist --scope=propagation-validation-server --include-dependencies
- name: Install and Bootstrap (cache hit) 🔧
if: steps.cache.outputs.cache-hit == 'true'
run: |
npm ci --ignore-scripts
npx lerna bootstrap --hoist --scope=propagation-validation-server --include-dependencies
- name: Install and Bootstrap 🔧
run: npm ci
- name: Generate version.ts files
run: lerna run version
run: npm run version:update
- name: Build 🔧
run: npm run compile

9
.gitignore vendored
View File

@ -8,6 +8,8 @@ logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Filter Logs singal files
!experimental/examples/logs
# Runtime data
pids
@ -64,7 +66,6 @@ typings/
# lock files
yarn.lock
package-lock.json
# docs files
docs
@ -87,3 +88,9 @@ package.json.lerna_backup
#IDEA
.idea
*.iml
# non-aggregated benchmark results
.benchmark-results.txt
# release notes for release creation
.tmp/

7
.gitmodules vendored
View File

@ -1,6 +1,3 @@
[submodule "experimental/packages/otlp-grpc-exporter-base/protos"]
path = experimental/packages/otlp-grpc-exporter-base/protos
url = https://github.com/open-telemetry/opentelemetry-proto.git
[submodule "experimental/packages/otlp-proto-exporter-base/protos"]
path = experimental/packages/otlp-proto-exporter-base/protos
[submodule "experimental/packages/otlp-transformer/protos"]
path = experimental/packages/otlp-transformer/protos
url = https://github.com/open-telemetry/opentelemetry-proto.git

15
.markdownlint-cli2.jsonc Normal file
View File

@ -0,0 +1,15 @@
// https://github.com/DavidAnson/markdownlint-cli2#markdownlint-cli2jsonc
{
"config": {
// https://github.com/DavidAnson/markdownlint/blob/main/README.md#rules--aliases
"MD013": false,
"MD024": false,
"MD033": false,
"MD041": false,
"MD026": false,
"MD004": { "style": "dash" } // ul-style
},
"gitignore": true,
"noBanner": true,
"noProgress": true
}

View File

@ -1,7 +0,0 @@
{
"MD013": false,
"MD024": false,
"MD033": false,
"MD041": false,
"MD026": false
}

1
.mocharc.yml Normal file
View File

@ -0,0 +1 @@
require: 'ts-node/register'

1
.npmrc Normal file
View File

@ -0,0 +1 @@
lockfile-version=2

2
.nycrc
View File

@ -3,12 +3,12 @@
"extension": [
".ts"
],
"reporter": ["text", "json"],
"exclude": [
"**/*.d.ts",
"build/**/*.*",
"src/index.ts",
"src/platform/**/index.ts",
"src/platform/browser/*.ts",
"src/version.ts",
"test/**/*.*",
".eslintrc.js",

View File

@ -1,22 +1,579 @@
<!-- markdownlint-disable MD004 -->
# CHANGELOG
All notable changes to this project will be documented in this file.
For API changes, see the [API CHANGELOG](api/CHANGELOG.md).
For experimental package changes, see the [experimental CHANGELOG](experimental/CHANGELOG.md).
For semantic convention package changes, see the [semconv CHANGELOG](semantic-conventions/CHANGELOG.md).
For notes on migrating to 2.x / 0.200.x see [the upgrade guide](doc/upgrade-to-2.x.md).
## Unreleased
* feat(instrumentation-http): Added support for redacting specific url query string values and url credentials in instrumentations [#5743](https://github.com/open-telemetry/opentelemetry-js/pull/5743) @rads-1996
### :boom: Breaking Changes
### :rocket: Features
### :bug: Bug Fixes
* fix(sdk-metrics): Remove invalid default value for `startTime` param to ExponentialHistogramAccumulation. This only impacted the closurescript compiler. [#5763](https://github.com/open-telemetry/opentelemetry-js/pull/5763) @trentm
### :books: Documentation
### :house: Internal
* chore: enable tsconfig isolatedModules [#5697](https://github.com/open-telemetry/opentelemetry-js/pull/5697) @legendecas
## 2.0.1
### :bug: Bug Fixes
* fix(resources): guard asynchronous resource attribute rejections from causing unhandled promise rejection [#5544](https://github.com/open-telemetry/opentelemetry-js/pull/5544) @dyladan
* fix(resource): do not trigger `Accessing resource attributes before async attributes settled` warning when detecting resources [#5546](https://github.com/open-telemetry/opentelemetry-js/pull/5546) @dyladan
* verbose logging of detected resource removed
* fix(resource): use dynamic import over require to improve ESM compliance [#5298](https://github.com/open-telemetry/opentelemetry-js/pull/5298) @xiaoxiangmoe
### :books: Documentation
* refactor(metrics): Updated metrics samples to no longer treat `sdk.start()` as async [#5617](https://github.com/open-telemetry/opentelemetry-js/pull/5617) @JacksonWeber
### :house: Internal
* refactor(sdk-trace-base): update semconv usage to ATTR_ exports [#5669](https://github.com/open-telemetry/opentelemetry-js/pull/5669) @trentm
* refactor(sdk-trace-web): update semconv usage to ATTR_ exports [#5672](https://github.com/open-telemetry/opentelemetry-js/pull/5672) @trentm
* refactor(resources): update semconv usage to ATTR_ exports [#5666](https://github.com/open-telemetry/opentelemetry-js/pull/5666) @trentm
* test(sdk-metrics): fix multiple problematic assertRejects() calls [#5611](https://github.com/open-telemetry/opentelemetry-js/pull/5611) @cjihrig
* refactor: replace assertRejects() with assert.rejects() [#5614](https://github.com/open-telemetry/opentelemetry-js/pull/5614) @cjihrig
* refactor(core): migrate from deprecated semconv constants [#5575](https://github.com/open-telemetry/opentelemetry-js/pull/5575) @alumni55748
* refactor(opentelemetry-core): simplify `parseKeyPairsIntoRecord()` [#5610](https://github.com/open-telemetry/opentelemetry-js/pull/5610) @cjihrig
## 2.0.0
### Summary
- The **minimum supported Node.js has been raised to `^18.19.0 || >=20.6.0`**. This means that support for Node.js 14 and 16 has been dropped.
- The **minimum supported TypeScript version has been raised to 5.0.4**.
- The **compilation target for transpiled TypeScript has been raised to ES2022** (from ES2017).
- The **public interface has changed**
- for notes on migrating to 2.x / 0.200.x see [the upgrade guide](https://github.com/open-telemetry/opentelemetry-js/tree/main/doc/upgrade-to-2.x.md)
- Only experimental versions `0.200.0` are compatible with this release
### :boom: Breaking Change
* feat(sdk-trace-base)!: Add `parentSpanContext` and remove `parentSpanId` from `Span` and `ReadableSpan` [#5450](https://github.com/open-telemetry/opentelemetry-js/pull/5450) @JacksonWeber
* (user-facing): the SDK's `Span`s `parentSpanId` was replaced by `parentSpanContext`, to migrate to the new property, please replace `span.parentSpanId` -> `span.parentSpanContext?.spanId`
* feat(sdk-metrics)!: drop deprecated `type` field on `MetricDescriptor` [#5291](https://github.com/open-telemetry/opentelemetry-js/pull/5291) @chancancode
* feat(sdk-metrics)!: drop deprecated `InstrumentDescriptor` type; use `MetricDescriptor` instead [#5277](https://github.com/open-telemetry/opentelemetry-js/pull/5266) @chancancode
* 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
* feat(sdk-metrics)!: extract `IMetricReader` interface and use it over abstract class [#5311](https://github.com/open-telemetry/opentelemetry-js/pull/5311)
* (user-facing): `MeterProviderOptions` now provides the more general `IMetricReader` type over `MetricReader`
* If you accept `MetricReader` in your public interface, consider accepting the more general `IMetricReader` instead to avoid unintentional breaking changes
* feat(sdk-trace)!: remove ability to have BasicTracerProvider instantiate exporters [#5239](https://github.com/open-telemetry/opentelemetry-js/pull/5239) @pichlermarc
* When extending `BasicTracerProvider`, the class offered multiple methods to facilitate the creation of exporters and auto-pairing with `SpanProcessor`s.
* This functionality has been removed - users may now pass `SpanProcessor`s to the base class constructor when extending
* (user-facing): `_registeredExporters` has been removed
* (user-facing): `_getSpanExporter` has been removed
* (user-facing): `_buildExporterFromEnv` has been removed
* feat(core)!: remove deprecated `IdGenerator` and `RandomIdGenerator` [#5309](https://github.com/open-telemetry/opentelemetry-js/pull/5309) @pichlermarc
* feat(core)!: remove deprecated type `InstrumentationLibrary` [#5308](https://github.com/open-telemetry/opentelemetry-js/pull/5308) @pichlermarc
* (user-facing): please use equivalent type `InstrumentationScope` instead
* feat(sdk-trace-base)!: replace usages fo `InstrumentationLibrary` with `InstrumentationScope` [#5308](https://github.com/open-telemetry/opentelemetry-js/pull/5308) @pichlermarc
* (user-facing) rename `Tracer.instrumentationLibrary` -> `Tracer.instrumentationScope`
* (user-facing) rename `ReadableSpan.instrumentationLibrary` -> `ReadableSpan.instrumentationScope`
* also renames the property in implementations of `ReadableSpan`
* feat(exporter-jaeger): use `ReadableSpan.instrumentationScope` over `ReadableSpan.instrumentationLibrary` [#5308](https://github.com/open-telemetry/opentelemetry-js/pull/5308) @pichlermarc
* feat(exporter-zipkin): use `ReadableSpan.instrumentationScope` over `ReadableSpan.instrumentationLibrary` [#5308](https://github.com/open-telemetry/opentelemetry-js/pull/5308) @pichlermarc
* chore!: update typescript to version `5.0.4` [#5145](https://github.com/open-telemetry/opentelemetry-js/pull/5145) @david-luna
* (user-facing) dropped support for `typescript@<5.0.4`
* (user-facing) all packages published from this repository will from now on drop support for old versions of `typescript` in minor releases. We will only drop support for versions that are older than 2 years.
* feat(core)!: remove deprecated samplers [#5316](https://github.com/open-telemetry/opentelemetry-js/pull/5316) @pichlermarc
* (user-facing): deprecated `AlwaysOnSampler` has moved to `@opentelemetry/sdk-trace-base`
* (user-facing): deprecated `AlwaysOffSampler` has moved to `@opentelemetry/sdk-trace-base`
* (user-facing): deprecated `ParentBasedSampler` has moved to `@opentelemetry/sdk-trace-base`
* (user-facing): deprecated `TraceIdRatioSampler` has moved to `@opentelemetry/sdk-trace-base`
* feat(resource): Merge sync and async resource interfaces into a single interface [#5350](https://github.com/open-telemetry/opentelemetry-js/pull/5350) @dyladan
* Resource constructor now takes a single argument which contains an optional `attributes` object
* Detected resource attribute values may be a promise or a synchronous value
* Resources are now merged by the order in which their detectors are configured instead of async attributes being last
* Resource detectors now return `DetectedResource` plain objects instead of `new Resource()`
* feat(sdk-trace-base)!: drop ability to instantiate propagators beyond defaults [#5355](https://github.com/open-telemetry/opentelemetry-js/pull/5355) @pichlermarc
* (user-facing): only a non-env-var based default is now used on `BasicTracerProvider#register()`.
* propagators can now not be configured via `OTEL_PROPAGATORS` or `window.OTEL_PROPAGATORS` anymore, please pass the propagator to `NodeTracerProvider#register()` instead.
* if not configured directly via code, `BasicTracerProvider#register()` will now fall back to defaults (`tracecontext` and `baggage`)
* feat(sdk-trace-node)!: drop ability to instantiate propagators beyond defaults [#5355](https://github.com/open-telemetry/opentelemetry-js/pull/5355) @pichlermarc
* (user-facing): only a non-env-var based default is now used on `NodeTracerProvider#register()`.
* propagators can now not be configured via `OTEL_PROPAGATORS` anymore, please pass the propagator to `NodeTracerProvider#register()` instead.
* if not configured via code, `NodeTracerProvider#register()` will now fall back to the defaults (`tracecontext` and `baggage`)
* if autoconfiguration based on enviornment variables is needed, please use `NodeSDK` from `@opentelemetry/sdk-node`.
* feat(sdk-trace-web)!: drop ability to instantiate propagators beyond defaults [#5355](https://github.com/open-telemetry/opentelemetry-js/pull/5355) @pichlermarc
* (user-facing): only a non-env-var based default is now used on `WebTracerProvider#register()`.
* propagators can now not be configured via `window.OTEL_PROPAGATORS` anymore, please pass the propagator to `WebTracerProvider#register()` instead.
* if not configured via code, `WebTracerProvider#register()` will now fall back to defaults (`tracecontext` and `baggage`)
* feat(sdk-trace)!: drop unnecessary exports [#5405](https://github.com/open-telemetry/opentelemetry-js/pull/5405) @pichlermarc
* (user-facing): `EXPORTER_FACTORY` is not used anymore and has been removed
* (user-facing): `PROPAGATOR_FACTORY` is not used anymore and has been removed
* (user-facing): `ForceFlushState` was intended for internal use and has been removed
* (user-facing): the `Tracer` class was unintentionally exported and has been removed
* to obtain a `Tracer`, please use `BasicTracerProvider#getTracer()`, `NodeTracerProvider#getTracer()` or `WebTracerProvider#getTracer()`
* to reference a `Tracer`, please use the `Tracer` type from `@opentelemetry/api`
* chore!: Raise the minimum supported Node.js version to `^18.19.0 || >=20.6.0`. Support for Node.js 14, 16, and early minor versions of 18 and 20 have been dropped. This applies to all packages except the 'api' and 'semantic-conventions' packages. [#5395](https://github.com/open-telemetry/opentelemetry-js/issues/5395) @trentm
* feat(core)!: remove TracesSamplerValues from exports [#5406](https://github.com/open-telemetry/opentelemetry-js/pull/5406) @pichlermarc
* (user-facing): TracesSamplerValues was only consumed internally and has been removed from exports without replacement
* chore(resources)!: Remove deprecated duplicate browser detector from `@opentelemetry/resource` in favor of `@opentelemetry/opentelemetry-browser-detector` [#5420](https://github.com/open-telemetry/opentelemetry-js/pull/5420)
* feat(core)!: remove unused and obsolete functions and types [#5444](https://github.com/open-telemetry/opentelemetry-js/pull/5444) @pichlermarc
* (user-facing): `VERSION` was an internal constant that was unintentionally exported. It has been removed without replacement.
* (user-facing): `isWrapped` has been removed in favor of `isWrapped` from `@opentelemetry/instrumentation`
* (user-facing): `ShimWrapped` has been removed in favor of `ShimWrapped` from `@opentelemetry/instrumentation`
* (user-facing): `hexToBase64` was a utility function that is not used by the SDK anymore. It has been removed without replacement.
* (user-facing): `hexToBinary` was a utility function that now internal to `@opentelemetry/otlp-tranformer`. It has been removed without replacement.
* (user-facing): `baggageUtils.getKeyParis` was an internal utility function that was unintentionally exported. It has been removed without replacement.
* (user-facing): `baggageUtils.serializeKeyPairs` was an internal utility function that was unintentionally exported. It has been removed without replacement.
* (user-facing): `baggageUtils.parseKeyPairsIntoRecord,` has been removed in favor of `parseKeyPairsIntoRecord`
* (user-facing): `baggageUtils.parsePairKeyValue` was an internal utility function that was unintentionally exported. It has been removed without replacement.
* (user-facing): `TimeOriginLegacy` has been removed without replacement.
* (user-facing): `isAttributeKey` was an internal utility function that was unintentionally exported. It has been removed without replacement.
* feat(sdk-trace-base)!: do not read environment variables from window in browsers [#5445](https://github.com/open-telemetry/opentelemetry-js/pull/5455) @pichlermarc
* (user-facing): all configuration previously possible via `window.OTEL_*` is now not supported anymore, please pass configuration options to constructors instead.
* Note: Node.js environment variable configuration continues to work as-is.
* feat(exporter-zipkin)!: do not read environment variables from window in browsers [#5465](https://github.com/open-telemetry/opentelemetry-js/pull/5465) @pichlermarc
* (user-facing): all configuration previously possible via `window.OTEL_*` is now not supported anymore, please pass configuration options to constructors instead.
* Note: Node.js environment variable configuration continues to work as-is.
* feat(resource)!: Remove resource class export in favor of functions and types only to aid in cross-version compatibility [#5421](https://github.com/open-telemetry/opentelemetry-js/pull/5421)
* Renames `Resource` class to `ResourceImpl` and makes it package-private
* Renames `IResource` interface to `Resource`
* Export function `resourceFromAttributes` to create a `Resource` from a `DetectedAttributes` object
* Export function `defaultResource` to create a default resource [#5467](https://github.com/open-telemetry/opentelemetry-js/pull/5467) @pichlermarc
* Export function `emptyResource` to create an empty resource [#5467](https://github.com/open-telemetry/opentelemetry-js/pull/5467) @pichlermarc
* Only export types and functions. This aids in cross-version compatibility and makes it more easily extensible in the future.
* feat(resources)!: do not read environment variables from window in browsers [#5466](https://github.com/open-telemetry/opentelemetry-js/pull/5466) @pichlermarc
* (user-facing): all configuration previously possible via `window.OTEL_*` is now not supported anymore
* If you have been using the `envDetector` in browser environments, please migrate to manually creating a resource.
* Note: Node.js environment variable configuration continues to work as-is.
* fix(sdk-trace-base)!: use `ParentBasedAlwaysOnSampler` over `AlwaysOnSampler` when bogus data is supplied to `OTEL_TRACES_SAMPLER`
* this aligns the SDK implementation with the specification
* feat(core)!: drop `getEnv()`, `getEnvWithoutDefaults()` [#5481](https://github.com/open-telemetry/opentelemetry-js/pull/5481) @pichlermarc
* (user-facing): `getEnv()` has been replaced by `getStringFromEnv()`, `getNumberFromEnv()`, `getBooleanFromEnv()`, `getStringListFromEnv()`
* these new functions do not include defaults, please inline any defaults if necessary (example: `getStringFromEnv("OTEL_FOO") ?? "my-default"`)
* to find the previously used defaults, please see [here](https://github.com/open-telemetry/opentelemetry-js/blob/e9d3c71918635d490b6a9ac9f8259265b38394d0/packages/opentelemetry-core/src/utils/environment.ts#L154-L239)
* (user-facing): `getEnvWithoutDefaults()` has been replaced by `getStringFromEnv()`, `getNumberFromEnv()`, `getBooleanFromEnv()`, `getStringListFromEnv()`
* (user-facing): `DEFAULT_ENVIRONMENT` has been removed, please inline any defaults from now on
* to find the previously used defaults, please see [here](https://github.com/open-telemetry/opentelemetry-js/blob/e9d3c71918635d490b6a9ac9f8259265b38394d0/packages/opentelemetry-core/src/utils/environment.ts#L154-L239)
* (user-facing): `ENVIRONMENT` has been removed without replacement
* (user-facing): `RAW_ENVIRONMENT` has been removed without replacement
* (user-facing): `parseEnvironment` has been removed without replacement
* feat(sdk-trace-base): remove `BasicTracerProvider#register()` to improve tree-shaking [#5503](https://github.com/open-telemetry/opentelemetry-js/pull/5503) @pichlermarc
* (user-facing): `BasicTracerProvider#register()` has been removed
* to register a global propagator, please use `propagation.setGlobalPropagator()` from `@opentelemetry/api`
* to register a global context manager, please use `context.setGlobalContextManager()` from `@opentelemetry/api`
* feat!: set compilation target to ES2022 for all packages except `@opentelemetry/api`, `@opentelemetry/api-logs`, `@opentelemetry/api-events`, and `@opentelemetry/semantic-conventions` [#5456](https://github.com/open-telemetry/opentelemetry-js/pull/5456) @david-luna
* (user-facing): drops browser runtimes which do not support ES2022 features
* feat(core)! drop unused constants [#5504](https://github.com/open-telemetry/opentelemetry-js/pull/5504) @pichlermarc
* (user-facing): `DEFAULT_ATTRIBUTE_VALUE_LENTGHT_LIMIT` has been removed, please use `Infinity` instead
* (user-facing): `DEFAULT_ATTRIBUTE_VALUE_COUNT_LIMIT` has been removed, please use `128` instead
* (user-facing): `DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT` has been removed, please use `128` instead
* (user-facing): `DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT` has been removed, please use `128` instead
### :rocket: (Enhancement)
* feat(sdk-trace-web): do not throw when passing extra options [#5357](https://github.com/open-telemetry/opentelemetry-js/pull/5357) @pichlermarc
* `WebTracerProvider` constructor now does not throw anymore when `contextManager` or `propagator` are passed as extra options to the constructor
* feat(sdk-trace-base): add stack trace warning to debug instrumentation [#5363](https://github.com/open-telemetry/opentelemetry-js/pull/5363) @neilfordyce
* feat(core): add more scalable replacements for getEnv(), getEnvWithoutDefaults() [#5443](https://github.com/open-telemetry/opentelemetry-js/pull/5443) @pichlermarc
* refactor(exporter-jaeger): migrate away from getEnv() [#5464](https://github.com/open-telemetry/opentelemetry-js/pull/5464) @pichlermarc
* feat(core): add `diagLogLevelFromString` utility [#5475](https://github.com/open-telemetry/opentelemetry-js/pull/5475) @pichlermarc
### :bug: (Bug Fix)
* fix(exporter-zipkin): remove usages of deprecated `url.parse` from `node:url` [#5390](https://github.com/open-telemetry/opentelemetry-js/pull/5390) @chancancode
* fix(sdk-metrics): do not export from `PeriodicExportingMetricReader` when there are no metrics to export. [#5288](https://github.com/open-telemetry/opentelemetry-js/pull/5288) @jacksonweber
* fix(sdk-trace-base): always wait on pending export in SimpleSpanProcessor. [#5303](https://github.com/open-telemetry/opentelemetry-js/pull/5303) @anuraaga
* fix(core): avoid using util in configuration.ts for browser compatibility [#5524](https://github.com/open-telemetry/opentelemetry-js/pull/5524) @sriraamas
### :house: (Internal)
* refactor(sdk-metrics): the internal `InstrumentDescriptor` type now extends `MetricDescriptor`; moved public `InstrumentType` type enum into `./src/export/MetricData.ts` [#5277](https://github.com/open-telemetry/opentelemetry-js/pull/5266)
* 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
* chore(selenium-tests): remove internal selenium-tests/ package, it wasn't being used @trentm
* chore: update typescript `module` compiler option to `node16`. [#5347](https://github.com/open-telemetry/opentelemetry-js/pull/5347) @david-luna
* feat(opentelemetry-instrumentation): replace `semver` package with internal semantic versioning check implementation to get rid of `semver` package initialization overhead especially in the AWS Lambda environment during coldstart [#5305](https://github.com/open-telemetry/opentelemetry-js/pull/5305) @serkan-ozal
* chore: unpin `@opentelemetry/semantic-conventions` dep to allow better de-duplication in installs [#5439](https://github.com/open-telemetry/opentelemetry-js/pull/5439) @trentm
## 1.30.0
### :rocket: (Enhancement)
* feat(sdk-metrics): PeriodicExportingMetricReader now flushes pending tasks at shutdown [#5242](https://github.com/open-telemetry/opentelemetry-js/pull/5242)
### :bug: (Bug Fix)
* fix(sdk-trace-base): do not load OTEL_ env vars on module load, but when needed [#5233](https://github.com/open-telemetry/opentelemetry-js/pull/5233)
* fix(instrumentation-xhr, instrumentation-fetch): content length attributes no longer get removed with `ignoreNetworkEvents: true` being set [#5229](https://github.com/open-telemetry/opentelemetry-js/issues/5229)
## 1.29.0
### :rocket: (Enhancement)
* feat(sdk-metrics): Add support for aggregation cardinality limit with a default limit of 2000. This limit can be customized via views [#5128](https://github.com/open-telemetry/opentelemetry-js/pull/5128)
## 1.28.0
### :rocket: (Enhancement)
* feat(sdk-metrics, sdk-trace): add `mergeResourceWithDefaults` flag, which allows opting-out of resources getting merged with the default resource [#4617](https://github.com/open-telemetry/opentelemetry-js/pull/4617)
* default: `true` (no change in behavior)
* note: `false` will become the default behavior in the next major version in order to comply with [specification requirements](https://github.com/open-telemetry/opentelemetry-specification/blob/f3511a5ccda376dfd1de76dfa086fc9b35b54757/specification/resource/sdk.md?plain=1#L31-L36)
* feat(sdk-trace-base): add `spanProcessors` property in `TracerConfig` interface. [#5138](https://github.com/open-telemetry/opentelemetry-js/pull/5138) @david-luna
### :bug: (Bug Fix)
* fix(sdk-metrics): await exports in `PeriodicExportingMetricReader` when async resource attributes have not yet settled [#5119](https://github.com/open-telemetry/opentelemetry-js/pull/5119/) @pichlermarc
* fix(sdk-trace): performance.now() may return the same value for consecutive calls [#5150](https://github.com/open-telemetry/opentelemetry-js/pull/5150) @dyladan
* fix(sdk-trace-base): pass BatchSpanProcessor#forceFlush() errors on visibilitychange/pagehide to globalErrorHandler [#5143](https://github.com/open-telemetry/opentelemetry-js/pull/5143) @pichlermarc
* fixes a bug where switching browser tabs with a failing exporter would cause an unhandled error
## 1.27.0
### :rocket: (Enhancement)
* feat: add processors for adding session.id attribute to spans and logs [#4972](https://github.com/open-telemetry/opentelemetry-js/pull/4972)
### :bug: (Bug Fix)
* fix(sdk-trace-base): avoid keeping non-string `status.message` on `Span#setStatus()` [#4999](https://github.com/open-telemetry/opentelemetry-js/pull/4999) @pichlermarc
* fix(sdk-metrics): Add missing catch and handle error in promise of `PeriodicExportingMetricReader` [#5006](https://github.com/open-telemetry/opentelemetry-js/pull/5006) @jj22ee
* fix(opentelemetry-core): confusing log extract of composite propagator [#5017](https://github.com/open-telemetry/opentelemetry-js/pull/5017) @rv2673
* fix(propagator-aws-xray-*): move propagators back to contrib repository [#4966](https://github.com/open-telemetry/opentelemetry-js/pull/4966) @pichlermarc
* The [specification](https://github.com/open-telemetry/opentelemetry-specification/blob/6672dbc97ddeb34f36c020a0f0a30323c8bc4d95/specification/context/api-propagators.md?plain=1#L354-L356) prohibits hosting these packages in the core repository
* `@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`
[#4992](https://github.com/open-telemetry/opentelemetry-js/pull/4992)
* refactor(sdk-metrics): replace `MetricsAttributes` with `Attributes` [#5021](https://github.com/open-telemetry/opentelemetry-js/pull/5021) @david-luna
* refactor(instrumentation-http): replace `SpanAttributes` and `MetricsAttributes` with `Attributes` [#5023](https://github.com/open-telemetry/opentelemetry-js/pull/5023) @david-luna
* chore(exporter-zipkin): remove usages of Span constructor [#5030](https://github.com/open-telemetry/opentelemetry-js/pull/5030) @david-luna
* test(instrumentation-http): remove usages of `new Span` in tests [#5035](https://github.com/open-telemetry/opentelemetry-js/pull/5035) @david-luna
## 1.26.0
### :rocket: (Enhancement)
* feat: include instrumentation scope info in console span and log record exporters [#4848](https://github.com/open-telemetry/opentelemetry-js/pull/4848) @blumamir
* feat(semconv): update semantic conventions to 1.27 (from 1.7.0) [#4690](https://github.com/open-telemetry/opentelemetry-js/pull/4690) @dyladan
* Exported names have changed to `ATTR_{name}` for attributes (e.g. `ATTR_HTTP_REQUEST_METHOD`), `{name}_VALUE_{value}` for enumeration values (e.g. `HTTP_REQUEST_METHOD_VALUE_POST`), and `METRIC_{name}` for metrics. Exported names from previous versions are deprecated.
* Import `@opentelemetry/semantic-conventions` for *stable* semantic conventions. Import `@opentelemetry/semantic-conventions/incubating` for all semantic conventions, stable and unstable.
* Note: Semantic conventions are now versioned separately from other stable artifacts, to correspond to the version of semantic conventions they provide. Changes will be in a separate changelog.
### :bug: (Bug Fix)
* fix(sdk-node): avoid spurious diag errors for unknown OTEL_NODE_RESOURCE_DETECTORS values [#4879](https://github.com/open-telemetry/opentelemetry-js/pull/4879) @trentm
* deps(opentelemetry-instrumentation): Bump `shimmer` types to 1.2.0 [#4865](https://github.com/open-telemetry/opentelemetry-js/pull/4865) @lforst
* fix(instrumentation): Fix optional property types [#4833](https://github.com/open-telemetry/opentelemetry-js/pull/4833) @alecmev
* fix(sdk-metrics): fix(sdk-metrics): use inclusive upper bounds in histogram [#4829](https://github.com/open-telemetry/opentelemetry-js/pull/4829)
### :house: (Internal)
* refactor: Simplify the code for the `getEnv` function [#4799](https://github.com/open-telemetry/opentelemetry-js/pull/4799) @danstarns
* refactor: remove "export *" in favor of explicit named exports [#4880](https://github.com/open-telemetry/opentelemetry-js/pull/4880) @robbkidd
* Packages updated:
* opentelemetry-context-zone
* opentelemetry-core
* opentelemetry-exporter-jaeger
* opentelemetry-exporter-zipkin
* opentelemetry-propagator-b3
* opentelemetry-propagator-jaeger
* opentelemetry-sdk-trace-base
* opentelemetry-sdk-trace-node
* opentelemetry-sdk-trace-web
* propagator-aws-xray
* sdk-metrics
* deps(sdk-metrics): remove unused lodash.merge dependency [#4905](https://github.com/open-telemetry/opentelemetry-js/pull/4905) @pichlermarc
## 1.25.1
### :books: (Refine Doc)
* refactor(examples): added usage of @opentelemetry/semantic-conventions and @opentelemetry/resources to the examples in examples/opentelemetry-web for maintaining consistency across all examples. [#4764](https://github.com/open-telemetry/opentelemetry-js/pull/4764) @Zen-cronic
### :house: (Internal)
* refactor(context-zone-peer-dep): use explicit exports [#4785](https://github.com/open-telemetry/opentelemetry-js/pull/4787) @pichlermarc
* refactor(context-async-hooks): use explicit exports [#4785](https://github.com/open-telemetry/opentelemetry-js/pull/4786) @pichlermarc
## 1.25.0
### :rocket: (Enhancement)
* feat: support node 22 [#4666](https://github.com/open-telemetry/opentelemetry-js/pull/4666) @dyladan
* feat(context-zone*): support zone.js 0.12.x [#4376](https://github.com/open-telemetry/opentelemetry-js/pull/4736) @maldago
* refactor(core): Use tree-shakeable string constants for semconv [#4739](https://github.com/open-telemetry/opentelemetry-js/pull/4739) @JohannesHuster
* refactor(shim-opentracing): Use tree-shakeable string constants for semconv [#4746](https://github.com/open-telemetry/opentelemetry-js/pull/4746) @JohannesHuster
* refactor(sdk-trace-web): Use tree-shakeable string constants for semconv [#4747](https://github.com/open-telemetry/opentelemetry-js/pull/4747) @JohannesHuster
* refactor(sdk-trace-node): Use tree-shakeable string constants for semconv [#4748](https://github.com/open-telemetry/opentelemetry-js/pull/4748) @JohannesHuster
* refactor(sdk-trace-base): Use tree-shakeable string constants for semconv [#4749](https://github.com/open-telemetry/opentelemetry-js/pull/4749) @JohannesHuster
* refactor(resources): update deprecated semconv to use exported strings [#4755](https://github.com/open-telemetry/opentelemetry-js/pull/#4755) @JamieDanielson
* refactor(exporters): update deprecated semconv to use exported strings [#4756](https://github.com/open-telemetry/opentelemetry-js/pull/#4756) @JamieDanielson
### :books: (Refine Doc)
* refactor(examples): use new exported string constants for semconv in examples/esm-http-ts [#4758](https://github.com/open-telemetry/opentelemetry-js/pull/4758) @Zen-cronic
* refactor(examples): use new exported string constants for semconv in examples/basic-tracer-node [#4759](https://github.com/open-telemetry/opentelemetry-js/pull/4759#pull) @Zen-cronic
* refactor(examples): use new exported string constants for semconv in examples/http [#4750](https://github.com/open-telemetry/opentelemetry-js/pull/4750) @Zen-cronic
* refactor(examples): use new exported string constants for semconv in examples/grpc-js [#4760](https://github.com/open-telemetry/opentelemetry-js/pull/4760#pull) @Zen-cronic
* refactor(examples): use new exported string constants for semconv in examples/otlp-exporter-node [#4762](https://github.com/open-telemetry/opentelemetry-js/pull/4762) @Zen-cronic
* refactor(examples): use new exported string constants for semconv in examples/opentracing-shim [#4761](https://github.com/open-telemetry/opentelemetry-js/pull/4761) @Zen-cronic
## 1.24.1
### :bug: (Bug Fix)
* fix(core): align inconsistent behavior of `getEnv()` and `getEnvWithoutDefaults()` when a `process` polyfill is used [#4648](https://github.com/open-telemetry/opentelemetry-js/pull/4648) @pichlermarc
* `getEnvWithoutDefaults()` would use `process.env` if it was defined when running in a browser, while `getEnv()` would always use `_globalThis`. Now both use `_globalThis` when running in a browser.
* fix(resources): prevent circular import (resource -> detector -> resource -> ...) [#4653](https://github.com/open-telemetry/opentelemetry-js/pull/4653) @pichlermarc
* fixes a circular import warning which would appear in rollup when bundling `@opentelemetry/resources`
* fix(exporter-metrics-otlp-grpc): add explicit otlp-exporter-base dependency to exporter-metrics-otlp-grpc [#4678](https://github.com/open-telemetry/opentelemetry-js/pull/4678) @AkselAllas
* fix(resources) wait for async attributes for detecting resources [#4687](https://github.com/open-telemetry/opentelemetry-js/pull/4687) @ziolekjj
## 1.24.0
### :rocket: (Enhancement)
* feat(sdk-trace-base): log resource attributes in ConsoleSpanExporter [#4605](https://github.com/open-telemetry/opentelemetry-js/pull/4605) @pichlermarc
* feat(propagator-aws-xray): moved AWS Xray propagator from contrib [4603](https://github.com/open-telemetry/opentelemetry-js/pull/4603) @martinkuba
* feat(resources): new experimental detector ServiceInstanceIdDetectorSync that sets the value for `service.instance.id` as random UUID. [#4608](https://github.com/open-telemetry/opentelemetry-js/pull/4608) @maryliag
### :bug: (Bug Fix)
* fix(sdk-trace-web): fix invalid timings in span events [#4486](https://github.com/open-telemetry/opentelemetry-js/pull/4486) @Abinet18
* fix(resources): ensure BrowserDetector does not think Node.js v21 is a browser [#4561](https://github.com/open-telemetry/opentelemetry-js/issues/4561) @trentm
* fix(core): align inconsistent behavior of `getEnv()` and `getEnvWithoutDefaults()` when a `process` polyfill is used [#4648](https://github.com/open-telemetry/opentelemetry-js/pull/4648) @pichlermarc
* `getEnvWithoutDefaults()` would use `process.env` if it was defined when running in a browser, while `getEnv()` would always use `_globalThis`. Now both use `_globalThis` when running in a browser.
## 1.23.0
### :rocket: (Enhancement)
* perf(sdk-trace-base): do not allocate arrays if resource has no pending async attributes [#4576](https://github.com/open-telemetry/opentelemetry-js/pull/4576) @Samuron
* feat(sdk-metrics): added experimental synchronous gauge to SDK [#4565](https://github.com/open-telemetry/opentelemetry-js/pull/4565) @clintonb
* this change will become user-facing in an upcoming release
### :bug: (Bug Fix)
* fix(sdk-metrics): increase the depth of the output to the console such that objects in the metric are printed fully to the console [#4522](https://github.com/open-telemetry/opentelemetry-js/pull/4522) @JacksonWeber
## 1.22.0
### :rocket: (Enhancement)
* feat(sdk-metrics): allow single bucket histograms [#4456](https://github.com/open-telemetry/opentelemetry-js/pull/4456) @pichlermarc
* feat(instrumentation): Make `init()` method public [#4418](https://github.com/open-telemetry/opentelemetry-js/pull/4418)
* feat(context-zone-peer-dep, context-zone): support zone.js 0.13.x, 0.14.x [#4469](https://github.com/open-telemetry/opentelemetry-js/pull/4469) @pichlermarc
* chore: Semantic Conventions export individual strings [4185](https://github.com/open-telemetry/opentelemetry-js/issues/4185)
* feat(sdk-trace-base): allow adding span links after span creation [#4536](https://github.com/open-telemetry/opentelemetry-js/pull/4536) @seemk
### :bug: (Bug Fix)
* fix(sdk-metrics): handle zero bucket counts in exponential histogram merge [#4459](https://github.com/open-telemetry/opentelemetry-js/pull/4459) @mwear
* fix(sdk-metrics): ignore `NaN` value recordings in Histograms [#4455](https://github.com/open-telemetry/opentelemetry-js/pull/4455) @pichlermarc
* fixes a bug where recording `NaN` on a histogram would result in the sum of bucket count values not matching the overall count
* fix(sdk-metrics): allow single bucket histograms [#4456](https://github.com/open-telemetry/opentelemetry-js/pull/4456) @pichlermarc
* fixes a bug where `Meter.createHistogram()` with the advice `explicitBucketBoundaries: []` would throw
* fix(context-zone-peer-dep, context-zone): support zone.js 0.13.x, 0.14.x [#4469](https://github.com/open-telemetry/opentelemetry-js/pull/4469) @pichlermarc
* fixes a bug where old versions of `zone.js` affected by <https://github.com/angular/angular/issues/53507> would be pulled in
### :books: (Refine Doc)
* docs: shorten readme sections [#4460](https://github.com/open-telemetry/opentelemetry-js/pull/4460) @legendecas
## 1.21.0
### :rocket: (Enhancement)
* feat(sdk-metrics): add constructor option to add metric readers [#4427](https://github.com/open-telemetry/opentelemetry-js/pull/4427) @pichlermarc
* deprecates `MeterProvider.addMetricReader()` please use the constructor option `readers` instead.
### :bug: (Bug Fix)
* fix(sdk-trace-base): ensure attribute value length limit is enforced on span creation [#4417](https://github.com/open-telemetry/opentelemetry-js/pull/4417) @pichlermarc
* fix(sdk-trace-base): Export processed spans while exporter failed [#4287](https://github.com/open-telemetry/opentelemetry-js/pull/4287) @Zirak
### :house: (Internal)
* chore(opentelemetry-context-zone-peer-dep): support zone.js ^v0.13.0 [#4320](https://github.com/open-telemetry/opentelemetry-js/pull/4320)
* refactor(core): drop unnecessary assignment of HOSTNAME [#4421](https://github.com/open-telemetry/opentelemetry-js/pull/4421) @pichlermarc
* test(opentelemetry-context-zone-peer-dep): transpile zone.js in tests [#4423](https://github.com/open-telemetry/opentelemetry-js/pull/4423) @legendecas
## 1.20.0
### :rocket: (Enhancement)
* perf(otlp-transformer): skip unnecessary base64 encode of span contexts [#4343](https://github.com/open-telemetry/opentelemetry-js/pull/4343) @seemk
* feat(sdk-trace-base): improve log messages when dropping span events [#4223](https://github.com/open-telemetry/opentelemetry-js/pull/4223) @mkubliniak
## 1.19.0
### :rocket: (Enhancement)
* feat: add node 20 support [#4336](https://github.com/open-telemetry/opentelemetry-js/pull/4336) @dyladan
### :house: (Internal)
* chore: type reference on zone.js [#4257](https://github.com/open-telemetry/opentelemetry-js/pull/4257) @legendecas
* chore: no need for 'packages' in lerna.json [#4264](https://github.com/open-telemetry/opentelemetry-js/pull/4264) @trentm
* test: add node 20 to test matrix [#4336](https://github.com/open-telemetry/opentelemetry-js/pull/4336) @dyladan
### :bug: (Bug Fix)
* fix(api-logs): allow for TimeInput type for LogRecord timestamps [#4345](https://github.com/open-telemetry/opentelemetry-js/pull/4345)
* fix(sdk-trace-web): only access location if it is defined [#4063](https://github.com/open-telemetry/opentelemetry-js/pull/4063)
* fix(sdk-trace-base): processor onStart called with a span having empty attributes
## 1.18.1
### :bug: (Bug Fix)
* fix(sdk-metrics): hand-roll MetricAdvice type as older API versions do not include it #4260
## 1.18.0
### :rocket: (Enhancement)
* feat(metrics): prototype experimental advice support [#3876](https://github.com/open-telemetry/opentelemetry-js/pull/3876) @legendecas
### :bug: (Bug Fix)
* fix(core): remove re-export of `version.ts` [#4225](https://github.com/open-telemetry/opentelemetry-js/pull/4225) @david-luna
### :house: (Internal)
* chore: track package-lock.json [#4238](https://github.com/open-telemetry/opentelemetry-js/pull/4238) @legendecas
* Switched to npm workspaces to bootstrap dependencies.
## 1.17.1
### :bug: (Bug Fix)
* fix(sdk-trace-base): BatchSpanProcessor flushes when `maxExportBatchSize` is reached [#3958](https://github.com/open-telemetry/opentelemetry-js/pull/3958) @nordfjord
* fix(sdk-metrics): allow instrument names to contain '/' [#4155](https://github.com/open-telemetry/opentelemetry-js/pull/4155)
* fix(sdk-metrics): prevent per-reader storages from keeping unreported accumulations in memory [#4163](https://github.com/open-telemetry/opentelemetry-js/pull/4163) @pichlermarc
* fixes a memory leak which occurred when two or more `MetricReader` instances are registered to a `MeterProvider`
* fix(sdk-metrics): do not report empty scopes and metrics [#4135](https://github.com/open-telemetry/opentelemetry-js/pull/4135) @pichlermarc
* Instruments that were created, but did not have measurements will not be exported anymore
* Meters (Scopes) that were created, but did not have any instruments with measurements under them will not be exported anymore.
* fix(exporter-zipkin): round duration to the nearest int in annotations to be compliant with zipkin protocol [#4167](https://github.com/open-telemetry/opentelemetry-js/pull/4167) @FelipeEmerim
### :books: (Refine Doc)
* docs(contributing): added guidelines for adding benchmark tests [#4169](https://github.com/open-telemetry/opentelemetry-js/pull/4169)
### :house: (Internal)
* test: added a performance benchmark test for span creation [#4105](https://github.com/open-telemetry/opentelemetry-js/pull/4105)
* test: added a workflow to run performance benchmark tests automatically [#4144](https://github.com/open-telemetry/opentelemetry-js/pull/4144)
## 1.17.0
### :bug: (Bug Fix)
* Revert "feat(api): add attributes argument to recordException API [#4071](https://github.com/open-telemetry/opentelemetry-js/pull/4071)"
* This feature was an unintentional breaking change introduced with API 1.5.0
* This PR updates all SDK packages to allow API 1.6.0, where this change has been reverted.
## 1.16.0
### :rocket: (Enhancement)
* feat(sdk-metrics): implement MetricProducer specification [#4007](https://github.com/open-telemetry/opentelemetry-js/pull/4007)
* feat: update PeriodicExportingMetricReader and PrometheusExporter to accept optional metric producers [#4077](https://github.com/open-telemetry/opentelemetry-js/pull/4077) @aabmass
### :bug: (Bug Fix)
* fix(exporter-zipkin): rounding duration to the nearest int to be compliant with zipkin protocol [#4064](https://github.com/open-telemetry/opentelemetry-js/pull/4064) @n0cloud
* fix(sdk-metrics): metric names should be case-insensitive
### :books: (Refine Doc)
* docs(guidelines): add dependencies guidelines [#4040](https://github.com/open-telemetry/opentelemetry-js/pull/4040)
## 1.15.2
### :bug: (Bug Fix)
* fix(core): stop rounding to nearest int in hrTimeTo*seconds() functions [#4014](https://github.com/open-telemetry/opentelemetry-js/pull/4014/) @aabmass
* fix(sdk-metrics): ignore invalid metric values [#3988](https://github.com/open-telemetry/opentelemetry-js/pull/3988) @legendecas
* fix(core): add baggage support for values containing an equals sign [#3975](https://github.com/open-telemetry/opentelemetry-js/pull/3975) @krosenk729
## 1.15.1
### :bug: (Bug Fix)
* Revert "feat(minification): Add noEmitHelpers, importHelpers and tslib as a dependency (#3914)"
[#4011](https://github.com/open-telemetry/opentelemetry-js/pull/4011) @dyladan
## 1.15.0
### :bug: (Bug Fix)
* fix(opentelemetry-exporter-prometheus): Update default PrometheusExporter to not append a timestamp to match the text based exposition format [#3961](https://github.com/open-telemetry/opentelemetry-js/pull/3961) @JacksonWeber
* fix(sdk-metrics): Update default Histogram's boundary to match OTEL's spec [#3893](https://github.com/open-telemetry/opentelemetry-js/pull/3893/) @chigia001
* fix(sdk-metrics): preserve startTime for cumulative ExponentialHistograms [#3934](https://github.com/open-telemetry/opentelemetry-js/pull/3934/) @aabmass
* fix(sdk-trace-web): add secureConnectionStart to https only [#3879](https://github.com/open-telemetry/opentelemetry-js/pull/3879) @Abinet18
### :house: (Internal)
* feat(minification): [Minification] Add noEmitHelpers, importHelpers and tslib as a dependency [#3913](https://github.com/open-telemetry/opentelemetry-js/issues/3913) @MSNev
## 1.14.0
### :rocket: (Enhancement)
* feat(SpanExporter): Add optional forceFlush to SpanExporter interface [#3753](https://github.com/open-telemetry/opentelemetry-js/pull/3753/) @sgracias1 @JacksonWeber
## 1.13.0
### :rocket: (Enhancement)
* feat(core): add environment variables for OTLP log exporters. [#3712](https://github.com/open-telemetry/opentelemetry-js/pull/3712/) @llc1123
### :bug: (Bug Fix)
* fix(http-instrumentation): stop listening to `request`'s `close` event once it has emitted `response` [#3625](https://github.com/open-telemetry/opentelemetry-js/pull/3625) @SimenB
* fix(sdk-node): fix initialization in bundled environments by not loading @opentelemetry/exporter-jaeger [#3739](https://github.com/open-telemetry/opentelemetry-js/pull/3739) @pichlermarc
## 1.12.0
### :rocket: (Enhancement)
* feat(tracing): log span name and IDs when span end is called multiple times [#3716](https://github.com/open-telemetry/opentelemetry-js/pull/3716)
* feat(core): add logs environment variables; add timeout utils method. [#3549](https://github.com/open-telemetry/opentelemetry-js/pull/3549/) @fuaiyi
### :bug: (Bug Fix)
* fix(instrumentation-http): fixed description for http.server.duration metric [#3710](https://github.com/open-telemetry/opentelemetry-js/pull/3710)
* fix(opentelemetry-sdk-trace-web): don't crash in runtimes where location isn't defined [#3715](https://github.com/open-telemetry/opentelemetry-js/pull/3715)
## 1.11.0
### :rocket: (Enhancement)
@ -32,6 +589,7 @@ For experimental package changes, see the [experimental CHANGELOG](experimental/
### :books: (Refine Doc)
* doc(sdk): update NodeSDK example [#3684](https://github.com/open-telemetry/opentelemetry-js/pull/3684) @martinkuba
* docs: change vmarchaud status from maintainer to emeritus [#3710](https://github.com/open-telemetry/opentelemetry-js/pull/3710) @vmarchaud
* docs: change rauno56 status from maintainer to emeritus [#3706](https://github.com/open-telemetry/opentelemetry-js/pull/3706) @rauno56
## 1.10.1
@ -234,16 +792,8 @@ There are no changes between 1.0.0 and the previous 0.33.0 version.
* fix(sdk-web): parse url with relative url string [#2972](https://github.com/open-telemetry/opentelemetry-js/pull/2972) @legendecas
### :books: (Refine Doc)
### :house: (Internal)
## 1.2.0
### :boom: Breaking Change
### :rocket: (Enhancement)
### :bug: (Bug Fix)
* fix: sanitize attributes inputs [#2881](https://github.com/open-telemetry/opentelemetry-js/pull/2881) @legendecas
@ -1693,7 +2243,7 @@ No changes
* `opentelemetry-api`, `opentelemetry-exporter-prometheus`, `opentelemetry-metrics`
* [#1137](https://github.com/open-telemetry/opentelemetry-js/pull/1137) Batch observer ([@obecny](https://github.com/obecny))
* `opentelemetry-exporter-collector`
* [#1256](https://github.com/open-telemetry/opentelemetry-js/pull/1256) feat: [Collector Metric Exporter][1/x] Rename CollectorExporter to CollectorTraceExporter ([@davidwitten](https://github.com/davidwitten))
* [#1256](https://github.com/open-telemetry/opentelemetry-js/pull/1256) feat: Collector Metric Exporter [1/x] Rename CollectorExporter to CollectorTraceExporter ([@davidwitten](https://github.com/davidwitten))
### :rocket: (Enhancement)
@ -2159,7 +2709,9 @@ Released 2020-03-19
Released 2020-03-16
### This is a first official beta release, which provides almost fully complete metrics, tracing, and context propagation functionality but makes no promises around breaking changes
### First official beta release
* provides almost fully complete metrics, tracing, and context propagation functionality but makes **no promises** around breaking changes
### :boom: Breaking Change

View File

@ -29,9 +29,9 @@ detailed instructions, see [development](#development) below.
```sh
git clone https://github.com/open-telemetry/opentelemetry-js.git
cd opentelemetry-js
npm install
npm ci
npm run compile
npm test
npm run test
```
## Pull Request Merge Guidelines
@ -79,21 +79,14 @@ Reporting bugs is an important contribution. Please make sure to include:
### Before you start
Please read project contribution
[guide](https://github.com/open-telemetry/community/blob/master/CONTRIBUTING.md)
[guide](https://github.com/open-telemetry/community/blob/main/guides/contributor)
for general practices for OpenTelemetry project.
#### Conventional commit
The Conventional Commits specification is a lightweight convention on top of commit messages. It provides an easy set of rules for creating an explicit commit history; which makes it easier to write automated tools on top of. This convention dovetails with SemVer, by describing the features, fixes, and breaking changes made in commit messages. You can see examples [here](https://www.conventionalcommits.org/en/v1.0.0-beta.4/#examples).
We use [commitlint](https://github.com/conventional-changelog/commitlint) and [husky](https://github.com/typicode/husky) to prevent bad commit message.
For example, you want to submit the following commit message `git commit -s -am "my bad commit"`.
You will receive the following error :
```text
✖ type must be one of [ci, feat, fix, docs, style, refactor, perf, test, revert, chore] [type-enum]
```
Here an example that will pass the verification: `git commit -s -am "chore(opentelemetry-core): update deps"`
It is recommended to have your commit messages follow the Conventional Commits specification, with possible types listed in [.commitlint.rc.yml](.commitlintrc.yml). Here an example that uses the recommended format: `git commit -s -am "chore(opentelemetry-core): update deps"`
### Changelog
@ -104,7 +97,7 @@ An entry into `CHANGELOG.md` or `experimental/CHANGELOG.md` is required for the
- Changes to default settings
- New components being added
It is reasonable to omit an entry to the changelog under these circuimstances:
It is reasonable to omit an entry to the changelog under these circumstances:
- Updating test to remove flakiness or improve coverage
- Updates to the CI/CD process
@ -145,7 +138,7 @@ git merge upstream/main
Remember to always work in a branch of your local copy, as you might otherwise have to contend with conflicts in main.
Please also see [GitHub workflow](https://github.com/open-telemetry/community/blob/master/CONTRIBUTING.md#github-workflow) section of general project contributing guide.
Please also see [GitHub workflow](https://github.com/open-telemetry/community/blob/main/guides/contributor/processes.md#github-workflow) section of general project contributing guide.
## Development
@ -161,10 +154,10 @@ Most of the commands needed for development are accessed as [npm scripts](https:
### Install dependencies
This will install all dependencies for the root project and all modules managed by `lerna`. By default, a `postinstall` script will run `lerna bootstrap` automatically after an install. This can be avoided using the `--ignore-scripts` option if desired.
This will install all dependencies for the root project and all modules managed by `npm workspaces`.
```sh
npm install
npm ci
```
### Compile modules
@ -203,6 +196,15 @@ cd packages/opentelemetry-module-name
npm run watch
```
#### TypeScript version & update policy
TypeScript version used to compile the pacakges is `v5.0.4`. If you plan to use any of the packages from this
repository to make your own application or package instrumentation make sure to use same version or higher.
<!-- Ref: https://github.com/open-telemetry/opentelemetry-js/pull/5145#issuecomment-2518263890 -->
As update policy OpenTelemetry JS will follow DefinitelyType's [support policy for TypeScript](https://github.com/DefinitelyTyped/DefinitelyTyped#support-window)
which sets a support window of 2 years.
### Running tests
Similar to compilations, tests can be run from the root to run all tests or from a single module to run only the tests for that module.
@ -223,6 +225,16 @@ To run the unit tests continuously in watch mode while developing, use:
npm run tdd
```
Packages that are expected to run in the browser have browser specific tests:
```sh
# Run browser-specific test
npm run test:browser
# Run web worker test
npm run test:webworker
```
### Linting
This project uses `eslint` to lint source code. Just like tests and compilation, linting can be done for all packages or only a single package.
@ -247,6 +259,21 @@ cd packages/opentelemetry-module-name
npm run lint:fix
```
The default lint command will check majority of files, including Markdown files (such as README.md files), but you
also have the option to check just the Markdown files with:
```sh
npm run lint:markdown
npm run lint:markdown:fix # can automatically fix some Markdown rules
```
The default command doesn't check the examples folder. To lint just the examples, use the script:
```sh
npm run lint:examples
npm run lint:examples:fix # can automatically fix some errors
```
### Generating docs
We use [typedoc](https://www.npmjs.com/package/typedoc) to generate the api documentation.
@ -286,10 +313,10 @@ export const _globalThis = typeof globalThis === 'object' ? globalThis : global;
/// packages/opentelemetry-core/src/platform/browser/globalThis.ts
export const _globalThis: typeof globalThis =
typeof globalThis === 'object' ? globalThis :
typeof self === 'object' ? self :
typeof window === 'object' ? window :
typeof global === 'object' ? global :
{} as typeof globalThis;
typeof self === 'object' ? self :
typeof window === 'object' ? window :
typeof global === 'object' ? global :
{} as typeof globalThis;
```
Even though the implementation may differ, the exported names must be aligned.

460
README.md
View File

@ -2,7 +2,7 @@
---
<p align="center">
<strong>
<a href="https://opentelemetry.io/docs/js/getting-started/">Getting Started</a>
<a href="https://opentelemetry.io/docs/languages/js/getting-started/">Getting Started</a>
&nbsp;&nbsp;&bull;&nbsp;&nbsp;
<a href="https://open-telemetry.github.io/opentelemetry-js">API and SDK Reference</a>
</strong>
@ -19,8 +19,8 @@
<img alt="license" src="https://img.shields.io/badge/license-Apache_2.0-green.svg?style=for-the-badge">
</a>
<br/>
<a href="https://circleci.com/gh/open-telemetry/opentelemetry-js">
<img alt="Build Status" src="https://circleci.com/gh/open-telemetry/opentelemetry-js.svg?style=shield">
<a href="https://github.com/open-telemetry/opentelemetry-js/actions">
<img alt="Build Status" src="https://github.com/open-telemetry/opentelemetry-js/actions/workflows/unit-test.yml/badge.svg?style=shield">
</a>
<img alt="Beta" src="https://img.shields.io/badge/status-beta-informational?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAIRlWElmTU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAACQAAAAAQAAAJAAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAABigAwAEAAAAAQAAABgAAAAA8A2UOAAAAAlwSFlzAAAWJQAAFiUBSVIk8AAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KTMInWQAABK5JREFUSA2dVm1sFEUYfmd2b/f2Pkqghn5eEQWKrRgjpkYgpoRCLC0oxV5apAiGUDEpJvwxEQ2raWPU+Kf8INU/RtEedwTCR9tYPloxGNJYTTQUwYqJ1aNpaLH3sXu3t7vjvFevpSqt7eSyM+/czvM8877PzB3APBoLgoDLsNePF56LBwqa07EKlDGg84CcWsI4CEbhNnDpAd951lXE2NkiNknCCTLv4HtzZuvPm1C/IKv4oDNXqNDHragety2XVzjECZsJARuBMyRzJrh1O0gQwLXuxofxsPSj4hG8fMLQo7bl9JJD8XZfC1E5yWFOMtd07dvX5kDwg6+2++Chq8txHGtfPoAp0gOFmhYoNFkHjn2TNUmrwRdna7W1QSkU8hvbGk4uThLrapaiLA2E6QY4u/lS9ItHfvJkxYsTMVtnAJLipYIWtVrcdX+8+b8IVnPl/R81prbuPZ1jpYw+0aEUGSkdFsgyBIaFTXCm6nyaxMtJ4n+TeDhJzGqZtQZcuYDgqDwDbqb0JF9oRpIG1Oea3bC1Y6N3x/WV8Zh83emhCs++hlaghDw+8w5UlYKq2lU7Pl8IkvS9KDqXmKmEwdMppVPKwGSEilmyAwJhRwWcq7wYC6z4wZ1rrEoMWxecdOjZWXeAQClBcYDN3NwVwD9pGwqUSyQgclcmxpNJqCuwLmDh3WtvPqXdlt+6Oz70HPGDNSNBee/EOen+rGbEFqDENBPDbtdCp0ukPANmzO0QQJYUpyS5IJJI3Hqt4maS+EB3199ozm8EDU/6fVNU2dQpdx3ZnKzeFXyaUTiasEV/gZMzJMjr3Z+WvAdQ+hs/zw9savimxUntDSaBdZ2f+Idbm1rlNY8esFffBit9HtK5/MejsrJVxikOXlb1Ukir2X+Rbdkd1KG2Ixfn2Ql4JRmELnYK9mEM8G36fAA3xEQ89fxXihC8q+sAKi9jhHxNqagY2hiaYgRCm0f0QP7H4Fp11LSXiuBY2aYFlh0DeDIVVFUJQn5rCnpiNI2gvLxHnASn9DIVHJJlm5rXvQAGEo4zvKq2w5G1NxENN7jrft1oxMdekETjxdH2Z3x+VTVYsPb+O0C/9/auN6v2hNZw5b2UOmSbG5/rkC3LBA+1PdxFxORjxpQ81GcxKc+ybVjEBvUJvaGJ7p7n5A5KSwe4AzkasA+crmzFtowoIVTiLjANm8GDsrWW35ScI3JY8Urv83tnkF8JR0yLvEt2hO/0qNyy3Jb3YKeHeHeLeOuVLRpNF+pkf85OW7/zJxWdXsbsKBUk2TC0BCPwMq5Q/CPvaJFkNS/1l1qUPe+uH3oD59erYGI/Y4sce6KaXYElAIOLt+0O3t2+/xJDF1XvOlWGC1W1B8VMszbGfOvT5qaRRAIFK3BCO164nZ0uYLH2YjNN8thXS2v2BK9gTfD7jHVxzHr4roOlEvYYz9QIz+Vl/sLDXInsctFsXjqIRnO2ZO387lxmIboLDZCJ59KLFliNIgh9ipt6tLg9SihpRPDO1ia5byw7de1aCQmF5geOQtK509rzfdwxaKOIq+73AvwCC5/5fcV4vo3+3LpMdtWHh0ywsJC/ZGoCb8/9D8F/ifgLLl8S8QWfU8cAAAAASUVORK5CYII=">
</p>
@ -37,10 +37,13 @@
## About this project
This is the JavaScript version of [OpenTelemetry](https://opentelemetry.io/), a framework for collecting traces and metrics from applications.
This is the JavaScript version of [OpenTelemetry](https://opentelemetry.io/), a framework for collecting traces, metrics, and logs from applications.
## Quick Start
**Much of OpenTelemetry JS documentation is written assuming the compiled application is run as CommonJS.**
For more details on ECMAScript Modules vs CommonJS, refer to [esm-support](https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/esm-support.md).
The following describes how to set up tracing for a basic web application.
For more detailed documentation, see the website at <https://opentelemetry.io/docs/instrumentation/js/>.
@ -68,15 +71,15 @@ const process = require('process');
const opentelemetry = require('@opentelemetry/sdk-node');
const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node');
const { ConsoleSpanExporter } = require('@opentelemetry/sdk-trace-base');
const { Resource } = require('@opentelemetry/resources');
const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions');
const { resourceFromAttributes } = require('@opentelemetry/resources');
const { ATTR_SERVICE_NAME } = require('@opentelemetry/semantic-conventions');
// configure the SDK to export telemetry data to the console
// enable all auto-instrumentations from the meta package
const traceExporter = new ConsoleSpanExporter();
const sdk = new opentelemetry.NodeSDK({
resource: new Resource({
[SemanticResourceAttributes.SERVICE_NAME]: 'my-service',
resource: resourceFromAttributes({
[ATTR_SERVICE_NAME]: 'my-service',
}),
traceExporter,
instrumentations: [getNodeAutoInstrumentations()]
@ -101,32 +104,51 @@ process.on('SIGTERM', () => {
node -r ./tracing.js app.js
```
The above example will emit auto-instrumented telemetry about your Node.js application to the console. For a more in-depth example, see the [Getting Started Guide](https://opentelemetry.io/docs/js/getting-started/). For more information about automatic instrumentation see [@opentelemetry/sdk-trace-node][otel-node], which provides auto-instrumentation for Node.js applications. If the automatic instrumentation does not suit your needs, or you would like to create manual traces, see [@opentelemetry/sdk-trace-base][otel-tracing]
The above example will emit auto-instrumented telemetry about your Node.js application to the console. For a more in-depth example, see the [Getting Started Guide](https://opentelemetry.io/docs/languages/js/getting-started/). For more information about automatic instrumentation see [@opentelemetry/sdk-trace-node][otel-node], which provides auto-instrumentation for Node.js applications. If the automatic instrumentation does not suit your needs, or you would like to create manual traces, see [@opentelemetry/sdk-trace-base][otel-tracing]
## Library Author
If you are a library author looking to build OpenTelemetry into your library, please see [the documentation][docs]. As a library author, it is important that you only depend on properties and methods published on the public API. If you use any properties or methods from the SDK that are not officially a part of the public API, your library may break if an [Application Owner](#application-owner) uses a different SDK implementation.
If you are a library author looking to build OpenTelemetry into your library, please see [the documentation][docs]. As a library author, it is important that you only depend on properties and methods published on the public API. If you use any properties or methods from the SDK that are not officially a part of the public API, your library may break if an application owner uses a different SDK implementation.
## Supported Runtimes
| Platform Version | Supported |
| ------------------- | ----------------------------------------------- |
| Node.JS `v18` | ✅ |
| Node.JS `v16` | ✅ |
| Node.JS `v14` | ✅ |
| Older Node Versions | See [Node Support](#node-support) |
| Web Browsers | See [Browser Support](#browser-support) below |
| Platform Version | Supported |
| ------------------- | --------------------------------------------- |
| Node.JS `v22` | :heavy_check_mark: |
| Node.JS `v20` | :heavy_check_mark: |
| Node.JS `v18` | :heavy_check_mark: |
| Older Node Versions | See [Node Support](#node-support) |
| Web Browsers | See [Browser Support](#browser-support) below |
### Node Support
Only Node.js Active or Maintenance LTS versions are supported.
Previous versions of node *may* work, but they are not tested by OpenTelemetry and they are not guaranteed to work.
Please note that versions of Node.JS v8 prior to `v8.12.0` will NOT work, because OpenTelemetry Node depends on the `perf_hooks` module introduced in `v8.5.0` and `performance.timeOrigin` that is set correctly starting in `v8.12.0`.
### Browser Support
Automated browser tests are run in the latest version of Headless Chrome.
There is currently no list of officially supported browsers, but OpenTelemetry is developed using standard web technologies with wide support and should work in currently supported versions of major browsers.
> [!IMPORTANT]
> 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].
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 2022](https://262.ecma-international.org/13.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 ES2022, 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 ES2022 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.
## TypeScript Support
OpenTelemetry JavaScript is built with TypeScript `v5.0.4`. If you have a TypeScript project (app, library, instrumentation, etc.)
that depends on it, we recommend using same or higher version to compile the project.
OpenTelemetry JavaScript will follows DefinitelyType's [support policy for TypeScript](https://github.com/DefinitelyTyped/DefinitelyTyped#support-window) which sets a support window of 2 years. Support for TypeScript versions older than 2 years will be dropped in minor releases of OpenTelemetry JavaScript.
## Package Version Compatibility
@ -136,19 +158,49 @@ There may also be API packages for experimental signals in the experimental dire
All stable packages are released with the same version, and all experimental packages are released with the same version.
The below table describes which versions of each set of packages are expected to work together.
| API | Stable Packages | Experimental Packages |
| ----- | --------------- | --------------------- |
| 1.3.x | 1.9.x | 0.35.x |
| 1.3.x | 1.8.x | 0.34.x |
| 1.2.x | 1.7.x | 0.33.x |
| 1.2.x | 1.6.x | 0.32.x |
| 1.1.x | 1.5.x | 0.31.x |
| 1.1.x | 1.4.x | 0.30.x |
| 1.1.x | 1.3.x | 0.29.x |
| 1.1.x | 1.2.x | 0.29.x |
| 1.1.x | 1.1.x | 0.28.x |
| 1.0.x | 1.0.x | 0.27.x |
| 1.0.x | 1.0.x | 0.26.x |
| Stable Packages | Experimental Packages |
|-----------------|-----------------------|
| 2.0.x | 0.200.x |
| 1.30.x | 0.57.x |
| 1.29.x | 0.56.x |
| 1.28.x | 0.55.x |
| 1.27.x | 0.54.x |
| 1.25.x | 0.52.x |
<details>
<summary>Older version compatibility matrix</summary>
<table>
<tr><th>Stable Packages</th> <th>Experimental Packages</th></tr>
<tr><td>1.24.x</td> <td>0.51.x</td></tr>
<tr><td>1.23.x</td> <td>0.50.x</td></tr>
<tr><td>1.22.x</td> <td>0.49.x</td></tr>
<tr><td>1.21.x</td> <td>0.48.x</td></tr>
<tr><td>1.20.x</td> <td>0.47.x</td></tr>
<tr><td>1.19.x</td> <td>0.46.x</td></tr>
<tr><td>1.18.x</td> <td>0.45.x</td></tr>
<tr><td>1.17.x</td> <td>0.43.x, 0.44.x</td></tr>
<tr><td>1.16.x</td> <td>0.42.x</td></tr>
<tr><td>1.15.x</td> <td>0.41.x</td></tr>
<tr><td>1.14.x</td> <td>0.40.x</td></tr>
<tr><td>1.13.x</td> <td>0.39.x</td></tr>
<tr><td>1.12.x</td> <td>0.38.x</td></tr>
<tr><td>1.11.x</td> <td>0.37.x</td></tr>
<tr><td>1.10.x</td> <td>0.36.x</td></tr>
<tr><td>1.9.x</td> <td>0.35.x</td></tr>
<tr><td>1.8.x (this and later versions require API >=1.3.0 for metrics)</td><td>0.34.x</td></tr>
<tr><td>1.7.x</td> <td>0.33.x</td></tr>
<tr><td>1.6.x</td> <td>0.32.x</td></tr>
<tr><td>1.5.x</td> <td>0.31.x</td></tr>
<tr><td>1.4.x</td> <td>0.30.x</td></tr>
<tr><td>1.3.x</td> <td>0.29.x</td></tr>
<tr><td>1.2.x</td> <td>0.29.x</td></tr>
<tr><td>1.1.x</td> <td>0.28.x</td></tr>
<tr><td>1.0.x</td> <td>0.27.x</td></tr>
<tr><td>1.0.x (this and later versions require API >=1.0.0 for traces)</td><td>0.26.x</td></tr>
</table>
</details>
## Versioning
@ -173,48 +225,85 @@ instructions to build and make changes to this project, see the
We have a weekly SIG meeting! See the [community page](https://github.com/open-telemetry/community#javascript-sdk) for meeting details and notes.
### Community members
### Maintainers
#### Maintainers ([@open-telemetry/js-maintainers](https://github.com/orgs/open-telemetry/teams/javascript-maintainers))
- [Amir Blum](https://github.com/blumamir), Aspecto
- [Chengzhong Wu](https://github.com/legendecas), Alibaba
- [Amir Blum](https://github.com/blumamir), Odigos
- [Chengzhong Wu](https://github.com/legendecas), Bloomberg
- [Daniel Dyla](https://github.com/dyladan), Dynatrace
- [Jamie Danielson](https://github.com/JamieDanielson), Honeycomb
- [Marc Pichler](https://github.com/pichlermarc), Dynatrace
- [Valentin Marchaud](https://github.com/vmarchaud), Open Source Contributor
- [Trent Mick](https://github.com/trentm), Elastic
*Find more about the maintainer role in [community repository](https://github.com/open-telemetry/community/blob/main/community-membership.md#maintainer).*
For more information about the maintainer role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#maintainer).
#### Approvers ([@open-telemetry/js-approvers](https://github.com/orgs/open-telemetry/teams/javascript-approvers))
### Approvers
- [Gerhard Stöbich](https://github.com/Flarna), Dynatrace
- [Haddas Bronfman](https://github.com/haddasbronfman), Cisco
- [John Bley](https://github.com/johnbley), Splunk
- [Mark Wolff](https://github.com/markwolff), Microsoft
- [David Luna](https://github.com/david-luna), Elastic
- [Hector Hernandez](https://github.com/hectorhdzg), Microsoft
- [Martin Kuba](https://github.com/martinkuba), Lightstep
- [Marylia Gutierrez](https://github.com/maryliag), Grafana Labs
- [Matthew Wear](https://github.com/mwear), LightStep
- [Naseem K. Ullah](https://github.com/naseemkullah), Transit
- [Neville Wylie](https://github.com/MSNev), Microsoft
- [Olivier Albertini](https://github.com/OlivierAlbertini), Ville de Montréal
- [Purvi Kanal](https://github.com/pkanal), Honeycomb
- [Svetlana Brennan](https://github.com/svetlanabrennan), New Relic
*Find more about the approver role in [community repository](https://github.com/open-telemetry/community/blob/main/community-membership.md#approver).*
For more information about the approver role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#approver).
#### Emeriti
### Triagers
- [Bartlomiej Obecny](https://github.com/obecny), LightStep, Maintainer
- [Daniel Khan](https://github.com/dkhan), Dynatrace, Maintainer
- [Mayur Kale](https://github.com/mayurkale22), Google, Maintainer
Members of this team have triager permissions for opentelemetry-js.git and opentelemetry-js-contrib.git.
- [Jackson Weber](https://github.com/JacksonWeber), Microsoft
For more information about the triager role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#triager).
### Contrib Triagers
Members of this team have triager permissions for opentelemetry-js-contrib.git.
Typically, members of this are [component owners](https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/.github/component_owners.yml) of one or more packages in the contrib repo.
- [Aaron Abbott](https://github.com/aabmass), Google
- [Abhinav Mathur](https://github.com/abhee11), AppDynamics
- [Bartlomiej Obecny](https://github.com/obecny)
- [Daniel Li](https://github.com/d4nyll)
- [Florencia Acosta](https://github.com/facostaembrace), Embrace
- [Jackson Weber](https://github.com/JacksonWeber), Microsoft
- [Jaryk](https://github.com/Ugzuzg), Volvo Cars
- [Jonathan Lee](https://github.com/jj22ee)
- [Jonathan Munz](https://github.com/jpmunz), Embrace
- [kirrg001](https://github.com/kirrg001), Instana
- [MartenH](https://github.com/mhennoch), Splunk
- [Mike Goldsmith](https://github.com/MikeGoldsmith), Honeycomb
- [Motti](https://github.com/mottibec)
- [Punya Biswal](https://github.com/punya), Google
- [Siim Kallas](https://github.com/seemk), Splunk
- [t2t2](https://github.com/t2t2), Splunk
- [Trivikram Kamat](https://github.com/trivikr), AWS
For more information about the triager role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#triager).
### Emeriti
- [Bartlomiej Obecny](https://github.com/obecny), Maintainer
- [Brandon Gonzalez](https://github.com/bg451), Approver
- [Daniel Khan](https://github.com/dkhan), Maintainer
- [Gerhard Stöbich](https://github.com/Flarna), Approver
- [Haddas Bronfman](https://github.com/haddasbronfman), Approver
- [John Bley](https://github.com/johnbley), Approver
- [Mark Wolff](https://github.com/markwolff), Approver
- [Mayur Kale](https://github.com/mayurkale22), Maintainer
- [Naseem K. Ullah](https://github.com/naseemkullah), Approver
- [Olivier Albertini](https://github.com/OlivierAlbertini), Approver
- [Rauno Viskus](https://github.com/rauno56), Maintainer
- [Brandon Gonzalez](https://github.com/bg451), LightStep, Approver
- [Roch Devost](https://github.com/rochdev), DataDog, Approver
- [Roch Devost](https://github.com/rochdev), Approver
- [Valentin Marchaud](https://github.com/vmarchaud), Maintainer
*Find more about the emeritus role in [community repository](https://github.com/open-telemetry/community/blob/main/community-membership.md#emeritus-maintainerapprovertriager).*
For more information about the emeritus role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#emeritus-maintainerapprovertriager).
#### Thanks to all the people who already contributed
### Thanks to all of our contributors!
<a href="https://github.com/open-telemetry/opentelemetry-js/graphs/contributors">
<img src="https://contributors-img.web.app/image?repo=open-telemetry/opentelemetry-js" />
<img alt="Repo contributors" src="https://contrib.rocks/image?repo=open-telemetry/opentelemetry-js" />
</a>
## Packages
@ -277,261 +366,9 @@ These instrumentations are hosted at <https://github.com/open-telemetry/opentele
| -------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| [@opentelemetry/shim-opentracing][otel-shim-opentracing] | OpenTracing shim allows existing OpenTracing instrumentation to report to OpenTelemetry |
## Upgrade guidelines
### 0.35.x to 0.36.0
- `@opentelemetry/sdk-node` changed `await start()` to now be synchronous
- `@opentelemetry/sdk-node` changed `await detectResources()` to now be synchronous
### 0.28.x to 0.29.x
- `@opentelemetry/exporter-trace-otlp-http` is now exporting `scopeSpans` instead of `instrumentationLibrarySpans`
- this exporter now requires collector version `0.48` and up.
- `@opentelemetry/exporter-metrics-otlp-http` is now exporting `scopeMetrics` instead of `instrumentationLibraryMetrics`
- this exporter now requires collector version `0.48` and up.
### 0.27.x to 0.28.x
- In `@opentelemetry/exporter-trace-otlp-http`, `OTLPExporterBase._isShutdown` is replaced with `_shutdownOnce`.
### 0.26.x to 0.27.x
Metric and trace exporters are split into separate packages:
- `@opentelemetry/exporter-otlp-http` => `@opentelemetry/exporter-trace-otlp-http` and `@opentelemetry/exporter-metrics-otlp-http`
- `@opentelemetry/exporter-otlp-grpc` => `@opentelemetry/exporter-trace-otlp-grpc` and `@opentelemetry/exporter-metrics-otlp-grpc`
- `@opentelemetry/exporter-otlp-proto` => `@opentelemetry/exporter-trace-otlp-proto` and `@opentelemetry/exporter-metrics-otlp-proto`
Metric types are renamed:
- `@openetelemetry/api-metrics`
- `Meter`
- `createValueRecorder` => `createHistogram`
- `createValueObserver` => `createObservableGauge`
- `createSumObserver` => `createObservableCounter`
- `createUpDownSumObserver` => `createObservableUpDownCounter`
- `ValueRecorder` => `Histogram`
- `ValueObserver` => `ObservableGauge`
- `SumObserver` => `ObservableCounter`
- `UpDownSumObserver` => `ObservableUpDownCounter`
- `ObserverResult` => `ObservableResult`
- `Observation.observer` => `Observation.observable`
- `@opentelemetry/sdk-metrics-base`
- `MetricKind`
- `VALUE_RECORDER` => `HISTOGRAM`
- `SUM_OBSERVER` => `OBSERVABLE_COUNTER`
- `UP_DOWN_SUM_OBSERVER` => `OBSERVABLE_UP_DOWN_COUNTER`
- `VALUE_OBSERVER` => `OBSERVABLE_GAUGE`
### 0.25.x to 1.x.y
Collector exporter packages and types are renamed:
- `@opentelemetry/exporter-collector` => `@opentelemetry/exporter-otlp-http`
- `CollectorExporterBase` => `OTLPExporterBase`
- `CollectorTraceExporter` => `OTLPTraceExporter`
- `CollectorMetricExporter` => `OTLPMetricExporter`
- `CollectorExporterBrowserBase` => `OTLPExporterBrowserBase`
- `CollectorExporterNodeBase` => `OTLPExporterNodeBase`
- `CollectorExporterConfigBase` => `OTLPExporterConfigBase`
- `CollectorExporterError` => `OTLPExporterError`
- `COLLECTOR_SPAN_KIND_MAPPING` => `OTLP_SPAN_KIND_MAPPING`
- `collectorTypes` => `otlpTypes`
- `@opentelemetry/exporter-collector-grpc` => `@opentelemetry/exporter-otlp-grpc`
- `CollectorTraceExporter` => `OTLPTraceExporter`
- `CollectorMetricExporter` => `OTLPMetricExporter`
- `CollectorExporterConfigNode` => `OTLPExporterConfigNode`
- `@opentelemetry/exporter-collector-proto` => `@opentelemetry/exporter-otlp-proto`
- `CollectorExporterNodeBase` => `OTLPExporterNodeBase`
- `CollectorMetricExporter` => `OTLPMetricExporter`
- `CollectorTraceExporter` => `OTLPTraceExporter`
- W3C propagators in @opentelemetry/core were renamed
- `HttpTraceContextPropagator` -> `W3CTraceContextPropagator`
- `HttpBaggagePropagator` -> `W3CBaggagePropagator`
### 0.24.x to 0.25.x
- SDKs packages for trace and metrics has been renamed to have a consistent naming schema:
- @opentelemetry/tracing -> @opentelemetry/sdk-trace-base
- @opentelemetry/node -> @opentelemetry/sdk-trace-node
- @opentelemetry/web -> @opentelemetry/sdk-trace-web
- @opentelemetry/metrics -> @opentelemetry/sdk-metrics-base
- @opentelemetry/node-sdk -> @opentelemetry/sdk-node
### 0.23.x to 0.24.x
- `ResourceAttributes` renamed to `SemanticResourceAttributes` in the `@opentelemetry/semantic-conventions` package
### 0.19.x to 0.20.0
- `HttpBaggage` renamed to `HttpBaggagePropagator`
- `HttpTraceContext` renamed to `HttpTraceContextPropagator`
- `JaegerHttpTracePropagator` renamed to `JaegerPropagator`
- `serviceName` configuration removed from Collector exporters. Use `service.name` Resource attribute instead.
- Prometheus exporter added suffix `_total` to counter metrics.
### 0.18.x to 0.19.0
- API is now a peer dependency. This means that users will need to include `@opentelemetry/api` as a dependency of their project in order to use the SDK. NPM version 7+ (Node 15+) should do this automatically.
- All plugins have been removed in favor of instrumentations.
- The `@opentelemetry/propagator-b3` package previously exported three propagators: `B3Propagator`,`B3SinglePropagator`, and `B3MultiPropagator`, but now only exports the `B3Propagator`. It extracts b3 context in single and multi-header encodings, and injects context using the single-header encoding by default, but can be configured to inject context using the multi-header endcoding during construction: `new B3Propagator({ injectEncoding: B3InjectEncoding.MULTI_HEADER })`. If you were previously using the `B3SinglePropagator` or `B3MultiPropagator` directly, you should update your code to use the `B3Propagator` with the appropriate configuration. See the [readme][otel-propagator-b3] for full details and usage.
- Sampling configuration via environment variable has changed. If you were using `OTEL_SAMPLING_PROBABILITY` then you should replace it with `OTEL_TRACES_SAMPLER=parentbased_traceidratio` and `OTEL_TRACES_SAMPLER_ARG=<number>` where `<number>` is a number in the [0..1] range, e.g. "0.25". Default is 1.0 if unset.
### 0.17.0 to 0.18.0
- `diag.setLogLevel` is removed and LogLevel can be set by an optional second parameter to `setLogger`
[PR-1975](https://github.com/open-telemetry/opentelemetry-js/pull/1975)
- Breaking change - The resulting resource MUST have all attributes that are on any of the two input resources. If a key exists on both the old and updating resource, the value of the updating resource MUST be picked - previously it was opposite.
### 0.16.0 to 0.17.0
[PR-1880](https://github.com/open-telemetry/opentelemetry-js/pull/1880) feat(diag-logger): introduce a new global level api.diag for internal diagnostic logging
[PR-1925](https://github.com/open-telemetry/opentelemetry-js/pull/1925) feat(diag-logger): part 2 - breaking changes - remove api.Logger, api.NoopLogger, core.LogLevel, core.ConsoleLogger
- These PR's remove the previous `Logger` and `LogLevel` implementations and change the way you should use the replacement `DiagLogger` and `DiagLogLevel`, below are simple examples of how to change your existing usages.
#### Setting the global diagnostic logger
The new global [`api.diag`](https://github.com/open-telemetry/opentelemetry-js/blob/main/api/src/api/diag.ts) provides the ability to set the global diagnostic logger `setLogger()` and logging level `setLogLevel()`, it is also a `DiagLogger` implementation and should be directly to log diagnostic messages.
All included logger references have been removed in preference to using the global `api.diag` directly, so you no longer need to pass around the logger instance via function parameters or included as part of the configuration for a component.
```javascript
import { diag, DiagConsoleLogger, DiagLogLevel } from "@opentelemetry/api";
// Setting the default Global logger to use the Console
// And optionally change the logging level (Defaults to INFO)
diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.ERROR)
```
#### Using the logger anywhere in the code
```typescript
import { diag } from "@opentelemetry/api";
// Remove or make optional the parameter and don't use it.
export function MyFunction() {
diag.debug("...");
diag.info("...");
diag.warn("...");
diag.error("...");
diag.verbose("..");
}
```
#### Setting the logger back to a noop
```typescript
import { diag } from "@opentelemetry/api";
diag.setLogger();
```
[PR-1855](https://github.com/open-telemetry/opentelemetry-js/pull/1855) Use instrumentation loader to load plugins and instrumentations
- Providers do no load the plugins anymore. Also PluginLoader has been removed from providers, use `registerInstrumentations` instead
```javascript
//Previously in node
const provider = new NodeTracerProvider({
plugins: {
'@grpc/grpc-js': {
enabled: true,
path: '@opentelemetry/plugin-grpc-js',
},
}
});
// Now
const provider = new NodeTracerProvider();
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
registerInstrumentations({
instrumentations: [
{
plugins: {
'@grpc/grpc-js': {
enabled: true,
path: '@opentelemetry/plugin-grpc-js',
},
}
}
],
tracerProvider: provider,
});
// or if you want to load only default instrumentations / plugins
registerInstrumentations({
tracerProvider: provider,
});
//Previously in browser
const provider = new WebTracerProvider({
plugins: [
new DocumentLoad()
]
});
// Now
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
const provider = new WebTracerProvider();
registerInstrumentations({
instrumentations: [
new DocumentLoad(),
],
});
```
- `registerInstrumentations` supports loading old plugins and instrumentations together. It also supports setting tracer provider and meter provider on instrumentations
[PR-1874](https://github.com/open-telemetry/opentelemetry-js/pull/1874) More specific API type names
Some types exported from `"@opentelemetry/api"` have been changed to be more specific.
- `AttributeValue` renamed to `SpanAttributeValue`
- `Attributes` renamed to `SpanAttributes`
- `EntryTtl` renamed to `BaggageEntryTtl`
- `EntryValue` renamed to `BaggageEntryValue`
- `Status` renamed to `SpanStatus`
- `StatusCode` renamed to `SpanStatusCode`
### 0.15.0 to 0.16.0
[PR-1863](https://github.com/open-telemetry/opentelemetry-js/pull/1863) removed public attributes `keepAlive` and `httpAgentOptions` from nodejs `CollectorTraceExporter` and `CollectorMetricExporter`
### 0.14.0 to 0.15.0
[PR-1764](https://github.com/open-telemetry/opentelemetry-js/pull/1764) removed some APIs from `Tracer`:
- `Tracer.getCurrentSpan()`: use `api.getSpan(api.context.active())`
- `Tracer.withSpan(span)`: use `api.context.with(api.setSpan(api.context.active(), span))`
- `Tracer.bind(target)`: use `api.context.bind(target)`
[PR-1797](https://github.com/open-telemetry/opentelemetry-js/pull/1797) chore!: split metrics into its own api package:
- Any references to `require("@opentelemetry/api").metrics` will need to be changed to `require("@opentelemetry/api-metrics").metrics`
[PR-1725](https://github.com/open-telemetry/opentelemetry-js/pull/1725) Use new gRPC default port
- The default port used by `@opentelemetry/exporter-collector-grpc` is changed from `55680` to `4317`
[PR-1749](https://github.com/open-telemetry/opentelemetry-js/pull/1749) chore: improve naming of span related context APIs
- Rename `[gs]etActiveSpan()` to `[gs]etSpan()`
- Rename `setExtractedSpanContext()` to `setSpanContext()`
- Rename `getParentSpanContext()` to `getSpanContext()`
## Useful links
- [Upgrade to SDK 2.x guide](./doc/upgrade-to-2.x.md)
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]
@ -544,6 +381,8 @@ Apache 2.0 - See [LICENSE][license-url] for more information.
[up-for-grabs-issues]: https://github.com/open-telemetry/OpenTelemetry-js/issues?q=is%3Aissue+is%3Aopen+label%3Aup-for-grabs
[good-first-issues]: https://github.com/open-telemetry/OpenTelemetry-js/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22
[client-instrumentation-sig]: https://docs.google.com/document/d/16Vsdh-DM72AfMg_FIt9yT9ExEWF4A_vRbQ3jRNBe09w/edit
[docs]: https://open-telemetry.github.io/opentelemetry-js
[compliance-matrix]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/spec-compliance-matrix.md
[CONTRIBUTING]: https://github.com/open-telemetry/opentelemetry-js/blob/main/CONTRIBUTING.md
@ -561,6 +400,5 @@ Apache 2.0 - See [LICENSE][license-url] for more information.
[otel-web]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-web
[otel-api]: https://github.com/open-telemetry/opentelemetry-js/tree/main/api
[otel-core]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core
[otel-propagator-b3]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-propagator-b3
[spec-versioning]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md

View File

@ -4,5 +4,5 @@ module.exports = {
"commonjs": true,
"shared-node-browser": true
},
...require('../eslint.config.js')
...require('../eslint.base.js')
}

View File

@ -1,9 +1,65 @@
<!-- markdownlint-disable MD004 -->
# CHANGELOG
All notable changes to this project will be documented in this file.
## Unreleased
### :boom: Breaking Change
### :rocket: (Enhancement)
* feat(api): improve isValidSpanId, isValidTraceId performance [#5714](https://github.com/open-telemetry/opentelemetry-js/pull/5714) @seemk
* feat(diag): change types in `DiagComponentLogger` from `any` to `unknown`[#5478](https://github.com/open-telemetry/opentelemetry-js/pull/5478) @loganrosen
### :bug: (Bug Fix)
### :books: (Refine Doc)
### :house: (Internal)
* refactor(api): remove "export *" in favor of explicit named exports [#4880](https://github.com/open-telemetry/opentelemetry-js/pull/4880) @robbkidd
* chore: enable tsconfig isolatedModules [#5697](https://github.com/open-telemetry/opentelemetry-js/pull/5697) @legendecas
## 1.9.0
### :rocket: (Enhancement)
* feat(metrics): added synchronous gauge [#4528](https://github.com/open-telemetry/opentelemetry-js/pull/4528) @clintonb
* feat(api): allow adding span links after span creation [#4536](https://github.com/open-telemetry/opentelemetry-js/pull/4536) @seemk
* This change is non-breaking for end-users, but breaking for Trace SDK implmentations in accordance with the [specification](https://github.com/open-telemetry/opentelemetry-specification/blob/a03382ada8afa9415266a84dafac0510ec8c160f/specification/upgrading.md?plain=1#L97-L122) as new features need to be implemented.
* feat: support node 22 [#4666](https://github.com/open-telemetry/opentelemetry-js/pull/4666) @dyladan
## 1.8.0
### :rocket: (Enhancement)
* feat(api): add SugaredTracer for functions not defined in the spec
### :bug: (Bug Fix)
* fix(api): fix unreachable @opentelemetry/api/experimental entry [#4446](https://github.com/open-telemetry/opentelemetry-js/pull/4446) @legendecas
## 1.7.0
### :rocket: (Enhancement)
* feat(metrics): prototype experimental advice support [#3876](https://github.com/open-telemetry/opentelemetry-js/pull/3876) @legendecas
* feat(api): publish api esnext target [#4231](https://github.com/open-telemetry/opentelemetry-js/pull/4231) @legendecas
## 1.6.0
### :bug: (Bug Fix)
* Revert "feat(api): add attributes argument to recordException API [#4071](https://github.com/open-telemetry/opentelemetry-js/pull/4071)"
* This feature was an unintentional breaking change introduced with 1.5.0
## 1.5.0
### :rocket: (Enhancement)
* feat(api): add attributes argument to recordException API [#4071](https://github.com/open-telemetry/opentelemetry-js/pull/4071)
## 1.4.1
### :bug: (Bug Fix)
@ -53,13 +109,13 @@ All notable changes to this project will be documented in this file.
* export tracer options ([#154](https://www.github.com/open-telemetry/opentelemetry-js-api/issues/154)) ([b125324](https://www.github.com/open-telemetry/opentelemetry-js-api/commit/b125324438fb2f24eb80c7c6673afc8cfc99575e))
### [1.0.4](https://www.github.com/open-telemetry/opentelemetry-js-api/compare/v1.0.3...v1.0.4) (2021-12-18)
## [1.0.4](https://www.github.com/open-telemetry/opentelemetry-js-api/compare/v1.0.3...v1.0.4) (2021-12-18)
### Bug Fixes
* align globalThis fallbacks with otel-core ([#126](https://www.github.com/open-telemetry/opentelemetry-js-api/issues/126)) ([3507de7](https://www.github.com/open-telemetry/opentelemetry-js-api/commit/3507de7c3b95396696657c021953b0b24a63a029))
### [1.0.3](https://www.github.com/open-telemetry/opentelemetry-js-api/compare/v1.0.2...v1.0.3) (2021-08-30)
## [1.0.3](https://www.github.com/open-telemetry/opentelemetry-js-api/compare/v1.0.2...v1.0.3) (2021-08-30)
### Bug Fixes

View File

@ -36,7 +36,7 @@ npm install @opentelemetry/api @opentelemetry/sdk-trace-base
### Trace Your Application
In order to get started with tracing, you will need to first register an SDK. The SDK you are using may provide a convenience method which calls the registration methods for you, but if you would like to call them directly they are documented here: [sdk registration methods][docs-sdk-registration].
In order to get started with tracing, you will need to first register an SDK. The SDK you are using may provide a convenience method which calls the registration methods for you, but if you would like to call them directly they are documented here: [SDK registration methods][docs-sdk-registration].
Once you have registered an SDK, you can start and end spans. A simple example of basic SDK registration and tracing a simple operation is below. The example should export spans to the console once per second. For more information, see the [tracing documentation][docs-tracing].
@ -45,8 +45,9 @@ const { trace } = require("@opentelemetry/api");
const { BasicTracerProvider, ConsoleSpanExporter, SimpleSpanProcessor } = require("@opentelemetry/sdk-trace-base");
// Create and register an SDK
const provider = new BasicTracerProvider();
provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()));
const provider = new BasicTracerProvider({
spanProcessors: [new SimpleSpanProcessor(new ConsoleSpanExporter())]
});
trace.setGlobalTracerProvider(provider);
// Acquire a tracer from the global tracer provider which will be used to trace the application
@ -112,6 +113,5 @@ Apache 2.0 - See [LICENSE][license-url] for more information.
[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions
[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/api/LICENSE
[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat
[docs-tracing]: https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/tracing.md
[docs-sdk-registration]: https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/sdk-registration.md

View File

@ -1,31 +1,41 @@
{
"name": "@opentelemetry/api",
"version": "1.4.1",
"version": "1.9.0",
"description": "Public API for OpenTelemetry",
"main": "build/src/index.js",
"module": "build/esm/index.js",
"esnext": "build/esnext/index.js",
"types": "build/src/index.d.ts",
"browser": {
"./src/platform/index.ts": "./src/platform/browser/index.ts",
"./build/esm/platform/index.js": "./build/esm/platform/browser/index.js",
"./build/esnext/platform/index.js": "./build/esnext/platform/browser/index.js",
"./build/src/platform/index.js": "./build/src/platform/browser/index.js"
},
"exports": {
".": {
"module": "./build/esm/index.js",
"esnext": "./build/esnext/index.js",
"types": "./build/src/index.d.ts",
"default": "./build/src/index.js"
},
"./experimental": {
"module": "./build/esm/experimental/index.js",
"esnext": "./build/esnext/experimental/index.js",
"types": "./build/src/experimental/index.d.ts",
"default": "./build/src/experimental/index.js"
}
},
"repository": "open-telemetry/opentelemetry-js",
"scripts": {
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
"codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../",
"codecov:webworker": "nyc report --reporter=json && codecov -f coverage/*.json -p ../",
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../",
"precompile": "lerna run version --scope $(npm pkg get name) --include-dependencies",
"precompile": "cross-var lerna run version --scope $npm_package_name --include-dependencies",
"compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
"docs": "typedoc",
"docs:deploy": "gh-pages --dist docs/out",
"docs:test": "linkinator docs/out --silent && linkinator docs/*.md *.md --markdown --silent",
"lint:fix": "eslint . --ext .ts --fix",
"lint": "eslint . --ext .ts",
"test:browser": "nyc karma start --single-run",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"test:webworker": "nyc karma start karma.worker.js --single-run",
"test:browser": "karma start --single-run",
"test": "nyc mocha 'test/**/*.test.ts'",
"test:webworker": "karma start karma.worker.js --single-run",
"cycle-check": "dpdm --exit-code circular:1 src/index.ts",
"version": "node ../scripts/version-update.js",
"prewatch": "npm run precompile",
@ -50,6 +60,9 @@
"build/esm/**/*.js",
"build/esm/**/*.js.map",
"build/esm/**/*.d.ts",
"build/esnext/**/*.js",
"build/esnext/**/*.js.map",
"build/esnext/**/*.d.ts",
"build/src/**/*.js",
"build/src/**/*.js.map",
"build/src/**/*.d.ts",
@ -60,30 +73,30 @@
"access": "public"
},
"devDependencies": {
"@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/sinon": "10.0.13",
"@types/webpack": "4.41.26",
"@types/mocha": "10.0.10",
"@types/node": "^8.10.66",
"@types/sinon": "17.0.4",
"@types/webpack": "5.28.5",
"@types/webpack-env": "1.16.3",
"codecov": "3.8.3",
"dpdm": "3.10.0",
"istanbul-instrumenter-loader": "3.0.1",
"karma": "6.3.16",
"babel-plugin-istanbul": "7.0.0",
"cross-var": "1.1.0",
"dpdm": "3.13.1",
"karma": "6.4.4",
"karma-chrome-launcher": "3.1.0",
"karma-coverage-istanbul-reporter": "3.0.3",
"karma-coverage": "2.2.1",
"karma-mocha": "2.0.1",
"karma-mocha-webworker": "1.3.0",
"karma-spec-reporter": "0.0.32",
"karma-webpack": "4.0.2",
"memfs": "3.4.9",
"mocha": "10.0.0",
"nyc": "15.1.0",
"sinon": "15.0.0",
"ts-loader": "8.4.0",
"ts-mocha": "10.0.0",
"typescript": "4.4.4",
"unionfs": "4.4.0",
"webpack": "4.46.0"
"karma-spec-reporter": "0.0.36",
"karma-webpack": "5.0.1",
"lerna": "6.6.2",
"memfs": "3.5.3",
"mocha": "11.1.0",
"nyc": "17.1.0",
"sinon": "18.0.1",
"ts-loader": "9.5.2",
"typescript": "5.0.4",
"unionfs": "4.5.4",
"webpack": "5.99.9"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/api",
"sideEffects": false

View File

@ -28,6 +28,8 @@ const NOOP_CONTEXT_MANAGER = new NoopContextManager();
/**
* Singleton object which represents the entry point to the OpenTelemetry Context API
*
* @since 1.0.0
*/
export class ContextAPI {
private static _instance?: ContextAPI;

View File

@ -34,6 +34,8 @@ const API_NAME = 'diag';
/**
* Singleton object which represents the entry point to the OpenTelemetry internal
* diagnostic API
*
* @since 1.0.0
*/
export class DiagAPI implements DiagLogger, DiagLoggerApi {
private static _instance?: DiagAPI;

View File

@ -42,6 +42,8 @@ const NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator();
/**
* Singleton object which represents the entry point to the OpenTelemetry Propagation API
*
* @since 1.0.0
*/
export class PropagationAPI {
private static _instance?: PropagationAPI;

View File

@ -40,6 +40,8 @@ const API_NAME = 'trace';
/**
* Singleton object which represents the entry point to the OpenTelemetry Tracing API
*
* @since 1.0.0
*/
export class TraceAPI {
private static _instance?: TraceAPI;

View File

@ -32,6 +32,9 @@ import { baggageEntryMetadataSymbol } from './internal/symbol';
* limitations under the License.
*/
/**
* @since 1.0.0
*/
export interface BaggageEntry {
/** `String` value of the `BaggageEntry`. */
value: string;
@ -45,6 +48,8 @@ export interface BaggageEntry {
/**
* Serializable Metadata defined by the W3C baggage specification.
* It currently has no special meaning defined by the OpenTelemetry or W3C.
*
* @since 1.0.0
*/
export type BaggageEntryMetadata = { toString(): string } & {
__TYPE__: typeof baggageEntryMetadataSymbol;
@ -54,6 +59,8 @@ export type BaggageEntryMetadata = { toString(): string } & {
* Baggage represents collection of key-value pairs with optional metadata.
* Each key of Baggage is associated with exactly one value.
* Baggage may be used to annotate and enrich telemetry data.
*
* @since 1.0.0
*/
export interface Baggage {
/**

View File

@ -37,6 +37,7 @@ export function createBaggage(
*
* @param str string metadata. Format is currently not defined by the spec and has no special meaning.
*
* @since 1.0.0
*/
export function baggageEntryMetadataFromString(
str: string

View File

@ -18,6 +18,8 @@
* Attributes is a map from string to attribute values.
*
* Note: only the own enumerable keys are counted as valid attribute keys.
*
* @since 1.3.0
*/
export interface Attributes {
[attributeKey: string]: AttributeValue | undefined;
@ -27,6 +29,8 @@ export interface Attributes {
* Attribute values may be any non-nullish primitive value except an object.
*
* null or undefined attribute values are invalid and will result in undefined behavior.
*
* @since 1.3.0
*/
export type AttributeValue =
| string

View File

@ -39,6 +39,8 @@ interface ExceptionWithName {
* Defines Exception.
*
* string or an object with one of (message or name or code) and optional stack
*
* @since 1.0.0
*/
export type Exception =
| ExceptionWithCode

View File

@ -24,6 +24,8 @@
* The second number is calculated by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds:
* HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * 1e9 = 150000000.
* This is represented in HrTime format as [1609504210, 150000000].
*
* @since 1.0.0
*/
export type HrTime = [number, number];
@ -31,5 +33,7 @@ export type HrTime = [number, number];
* Defines TimeInput.
*
* hrtime, epoch milliseconds, performance.now() or Date
*
* @since 1.0.0
*/
export type TimeInput = HrTime | number | Date;

View File

@ -17,5 +17,8 @@
// Split module-level variable definition into separate files to allow
// tree-shaking on each api instance.
import { ContextAPI } from './api/context';
/** Entrypoint for context API */
/**
* Entrypoint for context API
* @since 1.0.0
*/
export const context = ContextAPI.getInstance();

View File

@ -16,7 +16,11 @@
import { Context } from './types';
/** Get a key to uniquely identify a context value */
/**
* Get a key to uniquely identify a context value
*
* @since 1.0.0
*/
export function createContextKey(description: string) {
// The specification states that for the same input, multiple calls should
// return different keys. Due to the nature of the JS dependency management
@ -81,5 +85,9 @@ class BaseContext implements Context {
public deleteValue!: (key: symbol) => Context;
}
/** The root context is used as the default parent context when there is no active context */
/**
* The root context is used as the default parent context when there is no active context
*
* @since 1.0.0
*/
export const ROOT_CONTEXT: Context = new BaseContext();

View File

@ -14,6 +14,9 @@
* limitations under the License.
*/
/**
* @since 1.0.0
*/
export interface Context {
/**
* Get a value from the context.
@ -40,6 +43,9 @@ export interface Context {
deleteValue(key: symbol): Context;
}
/**
* @since 1.0.0
*/
export interface ContextManager {
/**
* Get the current active context

View File

@ -22,5 +22,7 @@ import { DiagAPI } from './api/diag';
* Defines Diagnostic handler used for internal diagnostic logging operations.
* The default provides a Noop DiagLogger implementation which may be changed via the
* diag.setLogger(logger: DiagLogger) function.
*
* @since 1.0.0
*/
export const diag = DiagAPI.instance();

View File

@ -33,23 +33,23 @@ export class DiagComponentLogger implements DiagLogger {
this._namespace = props.namespace || 'DiagComponentLogger';
}
public debug(...args: any[]): void {
public debug(...args: unknown[]): void {
return logProxy('debug', this._namespace, args);
}
public error(...args: any[]): void {
public error(...args: unknown[]): void {
return logProxy('error', this._namespace, args);
}
public info(...args: any[]): void {
public info(...args: unknown[]): void {
return logProxy('info', this._namespace, args);
}
public warn(...args: any[]): void {
public warn(...args: unknown[]): void {
return logProxy('warn', this._namespace, args);
}
public verbose(...args: any[]): void {
public verbose(...args: unknown[]): void {
return logProxy('verbose', this._namespace, args);
}
}
@ -57,7 +57,7 @@ export class DiagComponentLogger implements DiagLogger {
function logProxy(
funcName: keyof DiagLogger,
namespace: string,
args: any
args: unknown[]
): void {
const logger = getGlobal('diag');
// shortcut if logger not set

View File

@ -29,6 +29,8 @@ const consoleMap: { n: keyof DiagLogger; c: ConsoleMapKeys }[] = [
* A simple Immutable Console based diagnostic logger which will output any messages to the Console.
* If you want to limit the amount of logging to a specific level or lower use the
* {@link createLogLevelDiagLogger}
*
* @since 1.0.0
*/
export class DiagConsoleLogger implements DiagLogger {
constructor() {

View File

@ -14,6 +14,9 @@
* limitations under the License.
*/
/**
* @since 1.0.0
*/
export type DiagLogFunction = (message: string, ...args: unknown[]) => void;
/**
@ -23,6 +26,8 @@ export type DiagLogFunction = (message: string, ...args: unknown[]) => void;
* - a No-Op {@link createNoopDiagLogger}
* - a {@link DiagLogLevel} filtering wrapper {@link createLogLevelDiagLogger}
* - a general Console {@link DiagConsoleLogger} version.
*
* @since 1.0.0
*/
export interface DiagLogger {
/** Log an error scenario that was not expected and caused the requested operation to fail. */
@ -92,11 +97,16 @@ export enum DiagLogLevel {
/**
* Defines options for ComponentLogger
*
* @since 1.0.0
*/
export interface ComponentLoggerOptions {
namespace: string;
}
/**
* @since 1.4.1
*/
export interface DiagLoggerOptions {
/**
* The {@link DiagLogLevel} used to filter logs sent to the logger.

View File

@ -14,12 +14,10 @@
* limitations under the License.
*/
export {
OTLPExporterNodeBase,
sendWithHttp,
createHttpAgent,
configureCompression,
OTLPExporterNodeConfigBase,
CompressionAlgorithm,
} from './node';
export { OTLPExporterBrowserBase, sendWithXhr } from './browser';
/**
* Any exports here may change at any time and without warning
* @module @opentelemetry/api/experimental
*/
export { wrapTracer, SugaredTracer } from './trace/SugaredTracer';
export type { SugaredSpanOptions } from './trace/SugaredOptions';

View File

@ -14,20 +14,16 @@
* limitations under the License.
*/
import { Sampler, SamplingDecision, SamplingResult } from '@opentelemetry/api';
import { Span, SpanOptions } from '../../';
/**
* @deprecated Use the one defined in @opentelemetry/sdk-trace-base instead.
* Sampler that samples all traces.
* Options needed for span creation
*/
export class AlwaysOnSampler implements Sampler {
shouldSample(): SamplingResult {
return {
decision: SamplingDecision.RECORD_AND_SAMPLED,
};
}
toString(): string {
return 'AlwaysOnSampler';
}
export interface SugaredSpanOptions extends SpanOptions {
/**
* function to overwrite default exception behavior to record the exception. No exceptions should be thrown in the function.
* @param e Error which triggered this exception
* @param span current span from context
*/
onException?: (e: Error, span: Span) => void;
}

View File

@ -0,0 +1,215 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { SugaredSpanOptions } from './SugaredOptions';
import { context, Context, Span, SpanStatusCode, Tracer } from '../../';
const defaultOnException = (e: Error, span: Span) => {
span.recordException(e);
span.setStatus({
code: SpanStatusCode.ERROR,
});
};
/**
* return a new SugaredTracer created from the supplied one
* @param tracer
*/
export function wrapTracer(tracer: Tracer): SugaredTracer {
return new SugaredTracer(tracer);
}
export class SugaredTracer implements Tracer {
private readonly _tracer: Tracer;
constructor(tracer: Tracer) {
this._tracer = tracer;
this.startSpan = tracer.startSpan.bind(this._tracer);
this.startActiveSpan = tracer.startActiveSpan.bind(this._tracer);
}
startActiveSpan: Tracer['startActiveSpan'];
startSpan: Tracer['startSpan'];
/**
* Starts a new {@link Span} and calls the given function passing it the
* created span as first argument.
* Additionally, the new span gets set in context and this context is activated
* for the duration of the function call.
* The span will be closed after the function has executed.
* If an exception occurs, it is recorded, the status is set to ERROR and the exception is rethrown.
*
* @param name The name of the span
* @param [options] SugaredSpanOptions used for span creation
* @param [context] Context to use to extract parent
* @param fn function called in the context of the span and receives the newly created span as an argument
* @returns return value of fn
* @example
* const something = tracer.withActiveSpan('op', span => {
* // do some work
* });
* @example
* const something = await tracer.withActiveSpan('op', span => {
* // do some async work
* });
*/
withActiveSpan<F extends (span: Span) => ReturnType<F>>(
name: string,
fn: F
): ReturnType<F>;
withActiveSpan<F extends (span: Span) => ReturnType<F>>(
name: string,
options: SugaredSpanOptions,
fn: F
): ReturnType<F>;
withActiveSpan<F extends (span: Span) => ReturnType<F>>(
name: string,
options: SugaredSpanOptions,
context: Context,
fn: F
): ReturnType<F>;
withActiveSpan<F extends (span: Span) => ReturnType<F>>(
name: string,
arg2: F | SugaredSpanOptions,
arg3?: F | Context,
arg4?: F
): ReturnType<F> {
const { opts, ctx, fn } = massageParams(arg2, arg3, arg4);
return this._tracer.startActiveSpan(name, opts, ctx, (span: Span) =>
handleFn(span, opts, fn)
) as ReturnType<F>;
}
/**
* Starts a new {@link Span} and ends it after execution of fn without setting it on context.
* The span will be closed after the function has executed.
* If an exception occurs, it is recorded, the status is et to ERROR and rethrown.
*
* This method does NOT modify the current Context.
*
* @param name The name of the span
* @param [options] SugaredSpanOptions used for span creation
* @param [context] Context to use to extract parent
* @param fn function called in the context of the span and receives the newly created span as an argument
* @returns Span The newly created span
* @example
* const something = tracer.withSpan('op', span => {
* // do some work
* });
* @example
* const something = await tracer.withSpan('op', span => {
* // do some async work
* });
*/
withSpan<F extends (span: Span) => ReturnType<F>>(
name: string,
fn: F
): ReturnType<F>;
withSpan<F extends (span: Span) => ReturnType<F>>(
name: string,
options: SugaredSpanOptions,
fn: F
): ReturnType<F>;
withSpan<F extends (span: Span) => ReturnType<F>>(
name: string,
options: SugaredSpanOptions,
context: Context,
fn: F
): ReturnType<F>;
withSpan<F extends (span: Span) => ReturnType<F>>(
name: string,
options: SugaredSpanOptions,
context: Context,
fn: F
): ReturnType<F>;
withSpan<F extends (span: Span) => ReturnType<F>>(
name: string,
arg2: SugaredSpanOptions | F,
arg3?: Context | F,
arg4?: F
): ReturnType<F> {
const { opts, ctx, fn } = massageParams(arg2, arg3, arg4);
const span = this._tracer.startSpan(name, opts, ctx);
return handleFn(span, opts, fn) as ReturnType<F>;
}
}
/**
* Massages parameters of withSpan and withActiveSpan to allow signature overwrites
* @param arg
* @param arg2
* @param arg3
*/
function massageParams<F extends (span: Span) => ReturnType<F>>(
arg: F | SugaredSpanOptions,
arg2?: F | Context,
arg3?: F
) {
let opts: SugaredSpanOptions | undefined;
let ctx: Context | undefined;
let fn: F;
if (!arg2 && !arg3) {
fn = arg as F;
} else if (!arg3) {
opts = arg as SugaredSpanOptions;
fn = arg2 as F;
} else {
opts = arg as SugaredSpanOptions;
ctx = arg2 as Context;
fn = arg3 as F;
}
opts = opts ?? {};
ctx = ctx ?? context.active();
return { opts, ctx, fn };
}
/**
* Executes fn, returns results and runs onException in the case of exception to allow overwriting of error handling
* @param span
* @param opts
* @param fn
*/
function handleFn<F extends (span: Span) => ReturnType<F>>(
span: Span,
opts: SugaredSpanOptions,
fn: F
): ReturnType<F> {
const onException = opts.onException ?? defaultOnException;
const errorHandler = (e: Error) => {
onException(e, span);
span.end();
throw e;
};
try {
const ret = fn(span) as Promise<ReturnType<F>>;
// if fn is an async function, attach a recordException and spanEnd callback to the promise
if (typeof ret?.then === 'function') {
return ret.then(val => {
span.end();
return val;
}, errorHandler) as ReturnType<F>;
}
span.end();
return ret as ReturnType<F>;
} catch (e) {
// add throw to signal the compiler that this will throw in the inner scope
throw errorHandler(e);
}
}

View File

@ -14,23 +14,31 @@
* limitations under the License.
*/
export { BaggageEntry, BaggageEntryMetadata, Baggage } from './baggage/types';
/**
* @module @opentelemetry/api
*/
export type {
BaggageEntry,
BaggageEntryMetadata,
Baggage,
} from './baggage/types';
export { baggageEntryMetadataFromString } from './baggage/utils';
export { Exception } from './common/Exception';
export { HrTime, TimeInput } from './common/Time';
export { Attributes, AttributeValue } from './common/Attributes';
export type { Exception } from './common/Exception';
export type { HrTime, TimeInput } from './common/Time';
export type { Attributes, AttributeValue } from './common/Attributes';
// Context APIs
export { createContextKey, ROOT_CONTEXT } from './context/context';
export { Context, ContextManager } from './context/types';
export type { Context, ContextManager } from './context/types';
export type { ContextAPI } from './api/context';
// Diag APIs
export { DiagConsoleLogger } from './diag/consoleLogger';
export {
export { DiagLogLevel } from './diag/types';
export type {
DiagLogFunction,
DiagLogger,
DiagLogLevel,
ComponentLoggerOptions,
DiagLoggerOptions,
} from './diag/types';
@ -38,11 +46,12 @@ export type { DiagAPI } from './api/diag';
// Metrics APIs
export { createNoopMeter } from './metrics/NoopMeter';
export { MeterOptions, Meter } from './metrics/Meter';
export { MeterProvider } from './metrics/MeterProvider';
export {
ValueType,
export type { MeterOptions, Meter } from './metrics/Meter';
export type { MeterProvider } from './metrics/MeterProvider';
export { ValueType } from './metrics/Metric';
export type {
Counter,
Gauge,
Histogram,
MetricOptions,
Observable,
@ -51,11 +60,12 @@ export {
ObservableUpDownCounter,
UpDownCounter,
BatchObservableCallback,
MetricAdvice,
MetricAttributes,
MetricAttributeValue,
ObservableCallback,
} from './metrics/Metric';
export {
export type {
BatchObservableResult,
ObservableResult,
} from './metrics/ObservableResult';
@ -63,32 +73,34 @@ export type { MetricsAPI } from './api/metrics';
// Propagation APIs
export {
defaultTextMapGetter,
defaultTextMapSetter,
} from './propagation/TextMapPropagator';
export type {
TextMapPropagator,
TextMapSetter,
TextMapGetter,
defaultTextMapGetter,
defaultTextMapSetter,
} from './propagation/TextMapPropagator';
export type { PropagationAPI } from './api/propagation';
// Trace APIs
export { SpanAttributes, SpanAttributeValue } from './trace/attributes';
export { Link } from './trace/link';
export { ProxyTracer, TracerDelegator } from './trace/ProxyTracer';
export type { SpanAttributes, SpanAttributeValue } from './trace/attributes';
export type { Link } from './trace/link';
export { ProxyTracer, type TracerDelegator } from './trace/ProxyTracer';
export { ProxyTracerProvider } from './trace/ProxyTracerProvider';
export { Sampler } from './trace/Sampler';
export { SamplingDecision, SamplingResult } from './trace/SamplingResult';
export { SpanContext } from './trace/span_context';
export type { Sampler } from './trace/Sampler';
export { SamplingDecision, type SamplingResult } from './trace/SamplingResult';
export type { SpanContext } from './trace/span_context';
export { SpanKind } from './trace/span_kind';
export { Span } from './trace/span';
export { SpanOptions } from './trace/SpanOptions';
export { SpanStatus, SpanStatusCode } from './trace/status';
export type { Span } from './trace/span';
export type { SpanOptions } from './trace/SpanOptions';
export { type SpanStatus, SpanStatusCode } from './trace/status';
export { TraceFlags } from './trace/trace_flags';
export { TraceState } from './trace/trace_state';
export type { TraceState } from './trace/trace_state';
export { createTraceState } from './trace/internal/utils';
export { TracerProvider } from './trace/tracer_provider';
export { Tracer } from './trace/tracer';
export { TracerOptions } from './trace/tracer_options';
export type { TracerProvider } from './trace/tracer_provider';
export type { Tracer } from './trace/tracer';
export type { TracerOptions } from './trace/tracer_options';
export {
isSpanContextValid,
isValidTraceId,

View File

@ -17,5 +17,9 @@
// Split module-level variable definition into separate files to allow
// tree-shaking on each api instance.
import { MetricsAPI } from './api/metrics';
/** Entrypoint for metrics API */
/**
* Entrypoint for metrics API
*
* @since 1.3.0
*/
export const metrics = MetricsAPI.getInstance();

View File

@ -17,6 +17,7 @@
import {
BatchObservableCallback,
Counter,
Gauge,
Histogram,
MetricAttributes,
MetricOptions,
@ -29,6 +30,8 @@ import {
/**
* An interface describes additional metadata of a meter.
*
* @since 1.3.0
*/
export interface MeterOptions {
/**
@ -43,8 +46,20 @@ export interface MeterOptions {
* {@link Metric}s are used for recording pre-defined aggregation (`Counter`),
* or raw values (`Histogram`) in which the aggregation and attributes
* for the exported metric are deferred.
*
* @since 1.3.0
*/
export interface Meter {
/**
* Creates and returns a new `Gauge`.
* @param name the name of the metric.
* @param [options] the metric options.
*/
createGauge<AttributesTypes extends MetricAttributes = MetricAttributes>(
name: string,
options?: MetricOptions
): Gauge<AttributesTypes>;
/**
* Creates and returns a new `Histogram`.
* @param name the name of the metric.
@ -85,7 +100,7 @@ export interface Meter {
* @param [options] the metric options.
*/
createUpDownCounter<
AttributesTypes extends MetricAttributes = MetricAttributes
AttributesTypes extends MetricAttributes = MetricAttributes,
>(
name: string,
options?: MetricOptions
@ -100,7 +115,7 @@ export interface Meter {
* @param [options] the metric options.
*/
createObservableGauge<
AttributesTypes extends MetricAttributes = MetricAttributes
AttributesTypes extends MetricAttributes = MetricAttributes,
>(
name: string,
options?: MetricOptions
@ -115,7 +130,7 @@ export interface Meter {
* @param [options] the metric options.
*/
createObservableCounter<
AttributesTypes extends MetricAttributes = MetricAttributes
AttributesTypes extends MetricAttributes = MetricAttributes,
>(
name: string,
options?: MetricOptions
@ -130,7 +145,7 @@ export interface Meter {
* @param [options] the metric options.
*/
createObservableUpDownCounter<
AttributesTypes extends MetricAttributes = MetricAttributes
AttributesTypes extends MetricAttributes = MetricAttributes,
>(
name: string,
options?: MetricOptions
@ -151,7 +166,7 @@ export interface Meter {
* @param observables the observables associated with this batch observable callback
*/
addBatchObservableCallback<
AttributesTypes extends MetricAttributes = MetricAttributes
AttributesTypes extends MetricAttributes = MetricAttributes,
>(
callback: BatchObservableCallback<AttributesTypes>,
observables: Observable<AttributesTypes>[]
@ -167,7 +182,7 @@ export interface Meter {
* @param observables the observables associated with this batch observable callback
*/
removeBatchObservableCallback<
AttributesTypes extends MetricAttributes = MetricAttributes
AttributesTypes extends MetricAttributes = MetricAttributes,
>(
callback: BatchObservableCallback<AttributesTypes>,
observables: Observable<AttributesTypes>[]

View File

@ -18,6 +18,8 @@ import { Meter, MeterOptions } from './Meter';
/**
* A registry for creating named {@link Meter}s.
*
* @since 1.3.0
*/
export interface MeterProvider {
/**

View File

@ -18,8 +18,24 @@ import { Attributes, AttributeValue } from '../common/Attributes';
import { Context } from '../context/types';
import { BatchObservableResult, ObservableResult } from './ObservableResult';
/**
* Advisory options influencing aggregation configuration parameters.
*
* @since 1.7.0
* @experimental
*/
export interface MetricAdvice {
/**
* Hint the explicit bucket boundaries for SDK if the metric is been
* aggregated with a HistogramAggregator.
*/
explicitBucketBoundaries?: number[];
}
/**
* Options needed for metric creation
*
* @since 1.3.0
*/
export interface MetricOptions {
/**
@ -39,9 +55,20 @@ export interface MetricOptions {
* @default {@link ValueType.DOUBLE}
*/
valueType?: ValueType;
/**
* The advice influencing aggregation configuration parameters.
* @experimental
* @since 1.7.0
*/
advice?: MetricAdvice;
}
/** The Type of value. It describes how the data is reported. */
/**
* The Type of value. It describes how the data is reported.
*
* @since 1.3.0
*/
export enum ValueType {
INT,
DOUBLE,
@ -61,9 +88,11 @@ export enum ValueType {
* <li> count the number of checkpoints run. </li>
* <li> count the number of 5xx errors. </li>
* <ol>
*
* @since 1.3.0
*/
export interface Counter<
AttributesTypes extends MetricAttributes = MetricAttributes
AttributesTypes extends MetricAttributes = MetricAttributes,
> {
/**
* Increment value of counter by the input. Inputs must not be negative.
@ -71,8 +100,11 @@ export interface Counter<
add(value: number, attributes?: AttributesTypes, context?: Context): void;
}
/**
* @since 1.3.0
*/
export interface UpDownCounter<
AttributesTypes extends MetricAttributes = MetricAttributes
AttributesTypes extends MetricAttributes = MetricAttributes,
> {
/**
* Increment value of counter by the input. Inputs may be negative.
@ -80,8 +112,23 @@ export interface UpDownCounter<
add(value: number, attributes?: AttributesTypes, context?: Context): void;
}
/**
* @since 1.9.0
*/
export interface Gauge<
AttributesTypes extends MetricAttributes = MetricAttributes,
> {
/**
* Records a measurement.
*/
record(value: number, attributes?: AttributesTypes, context?: Context): void;
}
/**
* @since 1.3.0
*/
export interface Histogram<
AttributesTypes extends MetricAttributes = MetricAttributes
AttributesTypes extends MetricAttributes = MetricAttributes,
> {
/**
* Records a measurement. Value of the measurement must not be negative.
@ -91,34 +138,43 @@ export interface Histogram<
/**
* @deprecated please use {@link Attributes}
* @since 1.3.0
*/
export type MetricAttributes = Attributes;
/**
* @deprecated please use {@link AttributeValue}
* @since 1.3.0
*/
export type MetricAttributeValue = AttributeValue;
/**
* The observable callback for Observable instruments.
*
* @since 1.3.0
*/
export type ObservableCallback<
AttributesTypes extends MetricAttributes = MetricAttributes
AttributesTypes extends MetricAttributes = MetricAttributes,
> = (
observableResult: ObservableResult<AttributesTypes>
) => void | Promise<void>;
/**
* The observable callback for a batch of Observable instruments.
*
* @since 1.3.0
*/
export type BatchObservableCallback<
AttributesTypes extends MetricAttributes = MetricAttributes
AttributesTypes extends MetricAttributes = MetricAttributes,
> = (
observableResult: BatchObservableResult<AttributesTypes>
) => void | Promise<void>;
/**
* @since 1.3.0
*/
export interface Observable<
AttributesTypes extends MetricAttributes = MetricAttributes
AttributesTypes extends MetricAttributes = MetricAttributes,
> {
/**
* Sets up a function that will be called whenever a metric collection is initiated.
@ -133,12 +189,21 @@ export interface Observable<
removeCallback(callback: ObservableCallback<AttributesTypes>): void;
}
/**
* @since 1.3.0
*/
export type ObservableCounter<
AttributesTypes extends MetricAttributes = MetricAttributes
AttributesTypes extends MetricAttributes = MetricAttributes,
> = Observable<AttributesTypes>;
/**
* @since 1.3.0
*/
export type ObservableUpDownCounter<
AttributesTypes extends MetricAttributes = MetricAttributes
AttributesTypes extends MetricAttributes = MetricAttributes,
> = Observable<AttributesTypes>;
/**
* @since 1.3.0
*/
export type ObservableGauge<
AttributesTypes extends MetricAttributes = MetricAttributes
AttributesTypes extends MetricAttributes = MetricAttributes,
> = Observable<AttributesTypes>;

View File

@ -18,15 +18,16 @@ import { Meter } from './Meter';
import {
BatchObservableCallback,
Counter,
Gauge,
Histogram,
MetricAttributes,
MetricOptions,
Observable,
ObservableCallback,
ObservableCounter,
ObservableGauge,
ObservableUpDownCounter,
UpDownCounter,
MetricAttributes,
Observable,
} from './Metric';
/**
@ -36,6 +37,13 @@ import {
export class NoopMeter implements Meter {
constructor() {}
/**
* @see {@link Meter.createGauge}
*/
createGauge(_name: string, _options?: MetricOptions): Gauge {
return NOOP_GAUGE_METRIC;
}
/**
* @see {@link Meter.createHistogram}
*/
@ -114,6 +122,10 @@ export class NoopUpDownCounterMetric
add(_value: number, _attributes: MetricAttributes): void {}
}
export class NoopGaugeMetric extends NoopMetric implements Gauge {
record(_value: number, _attributes: MetricAttributes): void {}
}
export class NoopHistogramMetric extends NoopMetric implements Histogram {
record(_value: number, _attributes: MetricAttributes): void {}
}
@ -140,6 +152,7 @@ export const NOOP_METER = new NoopMeter();
// Synchronous instruments
export const NOOP_COUNTER_METRIC = new NoopCounterMetric();
export const NOOP_GAUGE_METRIC = new NoopGaugeMetric();
export const NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric();
export const NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric();
@ -151,6 +164,8 @@ export const NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC =
/**
* Create a no-op Meter
*
* @since 1.3.0
*/
export function createNoopMeter(): Meter {
return NOOP_METER;

View File

@ -18,9 +18,11 @@ import { MetricAttributes, Observable } from './Metric';
/**
* Interface that is being used in callback function for Observable Metric.
*
* @since 1.3.0
*/
export interface ObservableResult<
AttributesTypes extends MetricAttributes = MetricAttributes
AttributesTypes extends MetricAttributes = MetricAttributes,
> {
/**
* Observe a measurement of the value associated with the given attributes.
@ -41,7 +43,7 @@ export interface ObservableResult<
* Interface that is being used in batch observable callback function.
*/
export interface BatchObservableResult<
AttributesTypes extends MetricAttributes = MetricAttributes
AttributesTypes extends MetricAttributes = MetricAttributes,
> {
/**
* Observe a measurement of the value associated with the given attributes.

View File

@ -30,9 +30,9 @@ export const _globalThis: typeof globalThis =
typeof globalThis === 'object'
? globalThis
: typeof self === 'object'
? self
: typeof window === 'object'
? window
: typeof global === 'object'
? global
: ({} as typeof globalThis);
? self
: typeof window === 'object'
? window
: typeof global === 'object'
? (global as unknown as typeof globalThis)
: ({} as typeof globalThis);

View File

@ -14,4 +14,4 @@
* limitations under the License.
*/
export * from './globalThis';
export { _globalThis } from './globalThis';

View File

@ -14,4 +14,4 @@
* limitations under the License.
*/
export * from './node';
export { _globalThis } from './node';

View File

@ -14,4 +14,4 @@
* limitations under the License.
*/
export * from './globalThis';
export { _globalThis } from './globalThis';

View File

@ -17,5 +17,9 @@
// Split module-level variable definition into separate files to allow
// tree-shaking on each api instance.
import { PropagationAPI } from './api/propagation';
/** Entrypoint for propagation API */
/**
* Entrypoint for propagation API
*
* @since 1.0.0
*/
export const propagation = PropagationAPI.getInstance();

View File

@ -26,7 +26,10 @@ import { Context } from '../context/types';
* (extractor) side is usually an object such as http headers. Propagation is
* usually implemented via library-specific request interceptors, where the
* client-side injects values and the server-side extracts them.
*
* @since 1.0.0
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export interface TextMapPropagator<Carrier = any> {
/**
* Injects values from a given `Context` into a carrier.
@ -73,8 +76,11 @@ export interface TextMapPropagator<Carrier = any> {
/**
* A setter is specified by the caller to define a specific method
* to set key/value pairs on the carrier within a propagator.
* to set key/value pairs on the carrier within a propagator
*
* @since 1.0.0
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export interface TextMapSetter<Carrier = any> {
/**
* Callback used to set a key/value pair on an object.
@ -92,7 +98,10 @@ export interface TextMapSetter<Carrier = any> {
/**
* A getter is specified by the caller to define a specific method
* to get the value of a key from a carrier.
*
* @since 1.0.0
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export interface TextMapGetter<Carrier = any> {
/**
* Get a list of all keys available on the carrier.
@ -110,6 +119,9 @@ export interface TextMapGetter<Carrier = any> {
get(carrier: Carrier, key: string): undefined | string | string[];
}
/**
* @since 1.0.0
*/
export const defaultTextMapGetter: TextMapGetter = {
get(carrier, key) {
if (carrier == null) {
@ -126,6 +138,9 @@ export const defaultTextMapGetter: TextMapGetter = {
},
};
/**
* @since 1.0.0
*/
export const defaultTextMapSetter: TextMapSetter = {
set(carrier, key, value) {
if (carrier == null) {

View File

@ -17,5 +17,10 @@
// Split module-level variable definition into separate files to allow
// tree-shaking on each api instance.
import { TraceAPI } from './api/trace';
/** Entrypoint for trace API */
/**
* Entrypoint for trace API
*
* @since 1.0.0
*/
export const trace = TraceAPI.getInstance();

View File

@ -21,6 +21,7 @@ import { INVALID_SPAN_CONTEXT } from './invalid-span-constants';
import { Span } from './span';
import { SpanContext } from './span_context';
import { SpanStatus } from './status';
import { Link } from './link';
/**
* The NonRecordingSpan is the default {@link Span} that is used when no Span
@ -52,6 +53,14 @@ export class NonRecordingSpan implements Span {
return this;
}
addLink(_link: Link): this {
return this;
}
addLinks(_links: Link[]): this {
return this;
}
// By default does nothing
setStatus(_status: SpanStatus): this {
return this;

View File

@ -99,11 +99,15 @@ export class NoopTracer implements Tracer {
}
}
function isSpanContext(spanContext: any): spanContext is SpanContext {
function isSpanContext(spanContext: unknown): spanContext is SpanContext {
return (
spanContext !== null &&
typeof spanContext === 'object' &&
'spanId' in spanContext &&
typeof spanContext['spanId'] === 'string' &&
'traceId' in spanContext &&
typeof spanContext['traceId'] === 'string' &&
'traceFlags' in spanContext &&
typeof spanContext['traceFlags'] === 'number'
);
}

View File

@ -25,6 +25,8 @@ const NOOP_TRACER = new NoopTracer();
/**
* Proxy tracer provided by the proxy tracer provider
*
* @since 1.0.0
*/
export class ProxyTracer implements Tracer {
// When a real implementation is provided, this will be it
@ -75,6 +77,9 @@ export class ProxyTracer implements Tracer {
}
}
/**
* @since 1.0.3
*/
export interface TracerDelegator {
getDelegateTracer(
name: string,

View File

@ -29,6 +29,8 @@ const NOOP_TRACER_PROVIDER = new NoopTracerProvider();
* When a delegate is set, traces are provided from the delegate.
* When a delegate is set after tracers have already been provided,
* all tracers already provided will use the provided delegate implementation.
*
* @since 1.0.0
*/
export class ProxyTracerProvider implements TracerProvider {
private _delegate?: TracerProvider;

View File

@ -25,6 +25,8 @@ import { SpanKind } from './span_kind';
* This interface represent a sampler. Sampling is a mechanism to control the
* noise and overhead introduced by OpenTelemetry by reducing the number of
* samples of traces collected and sent to the backend.
*
* @since 1.0.0
*/
export interface Sampler {
/**

View File

@ -21,6 +21,8 @@ import { TraceState } from './trace_state';
* @deprecated use the one declared in @opentelemetry/sdk-trace-base instead.
* A sampling decision that determines how a {@link Span} will be recorded
* and collected.
*
* @since 1.0.0
*/
export enum SamplingDecision {
/**
@ -44,6 +46,8 @@ export enum SamplingDecision {
* @deprecated use the one declared in @opentelemetry/sdk-trace-base instead.
* A sampling result contains a decision for a {@link Span} and additional
* attributes the sampler would like to added to the Span.
*
* @since 1.0.0
*/
export interface SamplingResult {
/**

View File

@ -21,6 +21,8 @@ import { SpanKind } from './span_kind';
/**
* Options needed for span creation
*
* @since 1.0.0
*/
export interface SpanOptions {
/**

View File

@ -18,10 +18,12 @@ import { Attributes, AttributeValue } from '../common/Attributes';
/**
* @deprecated please use {@link Attributes}
* @since 1.0.0
*/
export type SpanAttributes = Attributes;
/**
* @deprecated please use {@link AttributeValue}
* @since 1.0.0
*/
export type SpanAttributeValue = AttributeValue;

View File

@ -17,6 +17,9 @@
import { TraceState } from '../trace_state';
import { TraceStateImpl } from './tracestate-impl';
/**
* @since 1.1.0
*/
export function createTraceState(rawTraceState?: string): TraceState {
return new TraceStateImpl(rawTraceState);
}

View File

@ -17,8 +17,19 @@
import { SpanContext } from './span_context';
import { TraceFlags } from './trace_flags';
/**
* @since 1.0.0
*/
export const INVALID_SPANID = '0000000000000000';
/**
* @since 1.0.0
*/
export const INVALID_TRACEID = '00000000000000000000000000000000';
/**
* @since 1.0.0
*/
export const INVALID_SPAN_CONTEXT: SpanContext = {
traceId: INVALID_TRACEID,
spanId: INVALID_SPANID,

View File

@ -31,6 +31,8 @@ import { SpanContext } from './span_context';
* However, it is desirable to associate incoming SpanContext to new trace
* initiated on service provider side so two traces (from Client and from
* Service Provider) can be correlated.
*
* @since 1.0.0
*/
export interface Link {
/** The {@link SpanContext} of a linked span. */

View File

@ -19,6 +19,7 @@ import { TimeInput } from '../common/Time';
import { SpanAttributes, SpanAttributeValue } from './attributes';
import { SpanContext } from './span_context';
import { SpanStatus } from './status';
import { Link } from './link';
/**
* An interface that represents a span. A span represents a single operation
@ -28,6 +29,8 @@ import { SpanStatus } from './status';
* may have children.
*
* Spans are created by the {@link Tracer.startSpan} method.
*
* @since 1.0.0
*/
export interface Span {
/**
@ -76,6 +79,26 @@ export interface Span {
startTime?: TimeInput
): this;
/**
* Adds a single link to the span.
*
* Links added after the creation will not affect the sampling decision.
* It is preferred span links be added at span creation.
*
* @param link the link to add.
*/
addLink(link: Link): this;
/**
* Adds multiple links to the span.
*
* Links added after the creation will not affect the sampling decision.
* It is preferred span links be added at span creation.
*
* @param links the links to add.
*/
addLinks(links: Link[]): this;
/**
* Sets a status to the span. If used, this will override the default Span
* status. Default is {@link SpanStatusCode.UNSET}. SetStatus overrides the value

View File

@ -19,6 +19,8 @@ import { TraceState } from './trace_state';
/**
* A SpanContext represents the portion of a {@link Span} which must be
* serialized and propagated along side of a {@link Baggage}.
*
* @since 1.0.0
*/
export interface SpanContext {
/**

View File

@ -13,6 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @since 1.0.0
*/
export enum SpanKind {
/** Default value. Indicates that the span is used internally. */
INTERNAL = 0,

View File

@ -18,20 +18,50 @@ import { NonRecordingSpan } from './NonRecordingSpan';
import { Span } from './span';
import { SpanContext } from './span_context';
const VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i;
const VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i;
// Valid characters (0-9, a-f, A-F) are marked as 1.
const isHex = new Uint8Array([
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1,
]);
export function isValidTraceId(traceId: string): boolean {
return VALID_TRACEID_REGEX.test(traceId) && traceId !== INVALID_TRACEID;
function isValidHex(id: string, length: number): boolean {
// As of 1.9.0 the id was allowed to be a non-string value,
// even though it was not possible in the types.
if (typeof id !== 'string' || id.length !== length) return false;
let r = 0;
for (let i = 0; i < id.length; i += 4) {
r +=
(isHex[id.charCodeAt(i)] | 0) +
(isHex[id.charCodeAt(i + 1)] | 0) +
(isHex[id.charCodeAt(i + 2)] | 0) +
(isHex[id.charCodeAt(i + 3)] | 0);
}
return r === length;
}
/**
* @since 1.0.0
*/
export function isValidTraceId(traceId: string): boolean {
return isValidHex(traceId, 32) && traceId !== INVALID_TRACEID;
}
/**
* @since 1.0.0
*/
export function isValidSpanId(spanId: string): boolean {
return VALID_SPANID_REGEX.test(spanId) && spanId !== INVALID_SPANID;
return isValidHex(spanId, 16) && spanId !== INVALID_SPANID;
}
/**
* Returns true if this {@link SpanContext} is valid.
* @return true if this {@link SpanContext} is valid.
*
* @since 1.0.0
*/
export function isSpanContextValid(spanContext: SpanContext): boolean {
return (

View File

@ -13,6 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @since 1.0.0
*/
export interface SpanStatus {
/** The status code of this message. */
code: SpanStatusCode;
@ -22,6 +26,8 @@ export interface SpanStatus {
/**
* An enumeration of status codes.
*
* @since 1.0.0
*/
export enum SpanStatusCode {
/**

View File

@ -13,6 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @since 1.0.0
*/
export enum TraceFlags {
/** Represents no flag set. */
NONE = 0x0,

View File

@ -14,6 +14,9 @@
* limitations under the License.
*/
/**
* @since 1.0.0
*/
export interface TraceState {
/**
* Create a new TraceState which inherits from this TraceState and has the

View File

@ -20,6 +20,8 @@ import { SpanOptions } from './SpanOptions';
/**
* Tracer provides an interface for creating {@link Span}s.
*
* @since 1.0.0
*/
export interface Tracer {
/**

View File

@ -16,6 +16,8 @@
/**
* An interface describes additional metadata of a tracer.
*
* @since 1.3.0
*/
export interface TracerOptions {
/**

View File

@ -19,6 +19,8 @@ import { TracerOptions } from './tracer_options';
/**
* A registry for creating named {@link Tracer}s.
*
* @since 1.0.0
*/
export interface TracerProvider {
/**

View File

@ -48,14 +48,14 @@ const diagLoggerFunctions = [
'error',
] as const;
describe('API', () => {
it('should expose a tracer provider via getTracerProvider', () => {
describe('API', function () {
it('should expose a tracer provider via getTracerProvider', function () {
const tracer = api.trace.getTracerProvider();
assert.ok(tracer);
assert.strictEqual(typeof tracer, 'object');
});
it('getActiveSpan should get the current span', () => {
it('getActiveSpan should get the current span', function () {
const span = new NonRecordingSpan();
const ctx = trace.setSpan(ROOT_CONTEXT, span);
context.setGlobalContextManager({
@ -69,8 +69,8 @@ describe('API', () => {
context.disable();
});
describe('Context', () => {
it('with should forward this, arguments and return value', () => {
describe('Context', function () {
it('with should forward this, arguments and return value', function () {
function fnWithThis(this: string, a: string, b: number): string {
assert.strictEqual(this, 'that');
assert.strictEqual(arguments.length, 2);
@ -89,7 +89,7 @@ describe('API', () => {
});
});
describe('GlobalTracerProvider', () => {
describe('GlobalTracerProvider', function () {
const spanContext = {
traceId: 'd4cda95b652f4a1592b449d5929fda1b',
spanId: '6e0c63257de34c92',
@ -103,14 +103,14 @@ describe('API', () => {
propagation.disable();
});
it('should use the global tracer provider', () => {
it('should use the global tracer provider', function () {
api.trace.setGlobalTracerProvider(new TestTracerProvider());
const tracer = api.trace.getTracerProvider().getTracer('name');
const span = tracer.startSpan('test');
assert.deepStrictEqual(span, dummySpan);
});
it('should set delegate only on success', () => {
it('should set delegate only on success', function () {
assert.strictEqual(
api.trace.setGlobalTracerProvider(new TestTracerProvider()),
true
@ -134,7 +134,7 @@ describe('API', () => {
}
}
describe('should use the global propagation', () => {
describe('should use the global propagation', function () {
const testKey = Symbol('kTestKey');
interface Carrier {
@ -169,7 +169,7 @@ describe('API', () => {
}
}
it('inject', () => {
it('inject', function () {
api.propagation.setGlobalPropagator(new TestTextMapPropagation());
const context = ROOT_CONTEXT.setValue(testKey, 15);
@ -186,7 +186,7 @@ describe('API', () => {
assert.strictEqual(carrier.setter, setter);
});
it('extract', () => {
it('extract', function () {
api.propagation.setGlobalPropagator(new TestTextMapPropagation());
const carrier: Carrier = {};
@ -209,7 +209,7 @@ describe('API', () => {
assert.strictEqual(data.getter, getter);
});
it('fields', () => {
it('fields', function () {
api.propagation.setGlobalPropagator(new TestTextMapPropagation());
const fields = api.propagation.fields();
@ -218,15 +218,15 @@ describe('API', () => {
});
});
describe('Global diag', () => {
it('initialization', () => {
describe('Global diag', function () {
it('initialization', function () {
const inst = DiagAPI.instance();
assert.deepStrictEqual(diag, inst);
});
diagLoggerFunctions.forEach(fName => {
it(`no argument logger ${fName} message doesn't throw`, () => {
it(`no argument logger ${fName} message doesn't throw`, function () {
//@ts-expect-error an undefined logger is not allowed
diag.setLogger();
assert.doesNotThrow(() => {
@ -234,21 +234,21 @@ describe('API', () => {
});
});
it(`null logger ${fName} message doesn't throw`, () => {
it(`null logger ${fName} message doesn't throw`, function () {
diag.setLogger(null as any);
assert.doesNotThrow(() => {
diag[fName](`${fName} message`);
});
});
it(`undefined logger ${fName} message doesn't throw`, () => {
it(`undefined logger ${fName} message doesn't throw`, function () {
diag.setLogger(undefined as any);
assert.doesNotThrow(() => {
diag[fName](`${fName} message`);
});
});
it(`empty logger ${fName} message doesn't throw`, () => {
it(`empty logger ${fName} message doesn't throw`, function () {
diag.setLogger({} as any);
assert.doesNotThrow(() => {
diag[fName](`${fName} message`);
@ -257,21 +257,21 @@ describe('API', () => {
});
});
describe('Global metrics', () => {
it('should expose a meter provider via getMeterProvider', () => {
describe('Global metrics', function () {
it('should expose a meter provider via getMeterProvider', function () {
const meter = metrics.getMeterProvider();
assert.ok(meter);
assert.strictEqual(typeof meter, 'object');
});
describe('GlobalMeterProvider', () => {
describe('GlobalMeterProvider', function () {
const dummyMeter = new NoopMeter();
beforeEach(() => {
metrics.disable();
});
it('should use the global meter provider', () => {
it('should use the global meter provider', function () {
metrics.setGlobalMeterProvider(new TestMeterProvider());
const meter = metrics.getMeterProvider().getMeter('name');
assert.deepStrictEqual(meter, dummyMeter);

View File

@ -22,15 +22,15 @@ import {
baggageEntryMetadataFromString,
} from '../../../src';
describe('Baggage', () => {
describe('create', () => {
it('should create an empty bag', () => {
describe('Baggage', function () {
describe('create', function () {
it('should create an empty bag', function () {
const bag = propagation.createBaggage();
assert.deepStrictEqual(bag.getAllEntries(), []);
});
it('should create a bag with entries', () => {
it('should create a bag with entries', function () {
const meta = baggageEntryMetadataFromString('opaque string');
const bag = propagation.createBaggage({
key1: { value: 'value1' },
@ -44,22 +44,24 @@ describe('Baggage', () => {
});
});
describe('get', () => {
it('should not allow modification of returned entries', () => {
describe('get', function () {
it('should not allow modification of returned entries', function () {
const bag = propagation
.createBaggage()
.setEntry('key', { value: 'value' });
const entry = bag.getEntry('key');
assert.ok(entry);
entry.value = 'mutated';
if (entry) {
entry.value = 'mutated';
}
assert.strictEqual(bag.getEntry('key')?.value, 'value');
});
});
describe('set', () => {
it('should create a new bag when an entry is added', () => {
describe('set', function () {
it('should create a new bag when an entry is added', function () {
const bag = propagation.createBaggage();
const bag2 = bag.setEntry('key', { value: 'value' });
@ -72,8 +74,8 @@ describe('Baggage', () => {
});
});
describe('remove', () => {
it('should create a new bag when an entry is removed', () => {
describe('remove', function () {
it('should create a new bag when an entry is removed', function () {
const bag = propagation.createBaggage({
key: { value: 'value' },
});
@ -87,7 +89,7 @@ describe('Baggage', () => {
assert.deepStrictEqual(bag2.getAllEntries(), []);
});
it('should create an empty bag multiple keys are removed', () => {
it('should create an empty bag multiple keys are removed', function () {
const bag = propagation.createBaggage({
key: { value: 'value' },
key1: { value: 'value1' },
@ -107,7 +109,7 @@ describe('Baggage', () => {
]);
});
it('should create an empty bag when it cleared', () => {
it('should create an empty bag when it cleared', function () {
const bag = propagation.createBaggage({
key: { value: 'value' },
key1: { value: 'value1' },
@ -124,8 +126,8 @@ describe('Baggage', () => {
});
});
describe('context', () => {
it('should set and get a baggage from a context', () => {
describe('context', function () {
it('should set and get a baggage from a context', function () {
const bag = propagation.createBaggage();
const ctx = propagation.setBaggage(ROOT_CONTEXT, bag);
@ -133,7 +135,7 @@ describe('Baggage', () => {
assert.strictEqual(bag, propagation.getBaggage(ctx));
});
it('should get the current baggage', () => {
it('should get the current baggage', function () {
const entries = {
banana: { value: 'boats' },
};
@ -151,21 +153,21 @@ describe('Baggage', () => {
});
});
describe('metadata', () => {
it('should create an opaque object which returns the string unchanged', () => {
describe('metadata', function () {
it('should create an opaque object which returns the string unchanged', function () {
const meta = baggageEntryMetadataFromString('this is a string');
assert.strictEqual(meta.toString(), 'this is a string');
});
it('should return an empty string if input is invalid', () => {
it('should return an empty string if input is invalid', function () {
//@ts-expect-error only accepts string values
const meta = baggageEntryMetadataFromString(1);
assert.strictEqual(meta.toString(), '');
});
it('should retain metadata', () => {
it('should retain metadata', function () {
const bag = propagation.createBaggage({
key: {
value: 'value',

View File

@ -18,14 +18,14 @@ import * as assert from 'assert';
import { createContextKey, ROOT_CONTEXT } from '../../../src/context/context';
import { NoopContextManager } from '../../../src/context/NoopContextManager';
describe('NoopContextManager', () => {
describe('NoopContextManager', function () {
let contextManager: NoopContextManager;
describe('.enable()', () => {
it('should work', () => {
describe('.enable()', function () {
it('should work', function () {
assert.doesNotThrow(() => {
contextManager = new NoopContextManager();
assert(
assert.ok(
contextManager.enable() === contextManager,
'should return this'
);
@ -33,10 +33,10 @@ describe('NoopContextManager', () => {
});
});
describe('.disable()', () => {
it('should work', () => {
describe('.disable()', function () {
it('should work', function () {
assert.doesNotThrow(() => {
assert(
assert.ok(
contextManager.disable() === contextManager,
'should return this'
);
@ -45,7 +45,7 @@ describe('NoopContextManager', () => {
});
});
describe('.with()', () => {
describe('.with()', function () {
it('should run the callback (ROOT_CONTEXT as target)', done => {
contextManager.with(ROOT_CONTEXT, done);
});
@ -53,7 +53,7 @@ describe('NoopContextManager', () => {
it('should run the callback (object as target)', done => {
const key = createContextKey('test key 1');
const test = ROOT_CONTEXT.setValue(key, 1);
contextManager.with(test, () => {
contextManager.with(test, function () {
assert.strictEqual(
contextManager.active(),
ROOT_CONTEXT,
@ -65,13 +65,13 @@ describe('NoopContextManager', () => {
it('should run the callback (when disabled)', done => {
contextManager.disable();
contextManager.with(ROOT_CONTEXT, () => {
contextManager.with(ROOT_CONTEXT, function () {
contextManager.enable();
return done();
});
});
it('should forward this, arguments and return value', () => {
it('should forward this, arguments and return value', function () {
function fnWithThis(this: string, a: string, b: number): string {
assert.strictEqual(this, 'that');
assert.strictEqual(arguments.length, 2);
@ -96,8 +96,8 @@ describe('NoopContextManager', () => {
});
});
describe('.active()', () => {
it('should always return ROOT_CONTEXT (when enabled)', () => {
describe('.active()', function () {
it('should always return ROOT_CONTEXT (when enabled)', function () {
assert.strictEqual(
contextManager.active(),
ROOT_CONTEXT,
@ -105,7 +105,7 @@ describe('NoopContextManager', () => {
);
});
it('should always return ROOT_CONTEXT (when disabled)', () => {
it('should always return ROOT_CONTEXT (when disabled)', function () {
contextManager.disable();
assert.strictEqual(
contextManager.active(),
@ -116,8 +116,8 @@ describe('NoopContextManager', () => {
});
});
describe('.bind()', () => {
it('should return the same target (when enabled)', () => {
describe('.bind()', function () {
it('should return the same target (when enabled)', function () {
const test = { a: 1 };
assert.deepStrictEqual(
contextManager.bind(contextManager.active(), test),
@ -125,7 +125,7 @@ describe('NoopContextManager', () => {
);
});
it('should return the same target (when disabled)', () => {
it('should return the same target (when disabled)', function () {
contextManager.disable();
const test = { a: 1 };
assert.deepStrictEqual(

View File

@ -28,7 +28,7 @@ class SpyLogger implements DiagLogger {
const loggerFunctions = ['verbose', 'debug', 'info', 'warn', 'error'];
describe('ComponentLogger', () => {
describe('ComponentLogger', function () {
let logger: DiagLogger;
const sandbox = sinon.createSandbox();
@ -47,7 +47,7 @@ describe('ComponentLogger', () => {
loggerFunctions.forEach(name => {
const fName = name as keyof SpyLogger;
it(`should call global logger function "${name}" with namespace as first param`, () => {
it(`should call global logger function "${name}" with namespace as first param`, function () {
const componentLogger = diag.createComponentLogger({ namespace: 'foo' });
componentLogger[fName]('test');

View File

@ -44,7 +44,7 @@ const expectedConsoleMap: { [n: string]: keyof Console } = {
verbose: 'trace',
};
describe('DiagConsoleLogger', () => {
describe('DiagConsoleLogger', function () {
const origConsole = console;
const orig: any = {};
const calledArgs: any = {};
@ -92,9 +92,9 @@ describe('DiagConsoleLogger', () => {
});
});
describe('constructor', () => {
describe('constructor', function () {
diagLoggerFunctions.forEach(fName => {
it(`console logger should provide ${fName} function`, () => {
it(`console logger should provide ${fName} function`, function () {
const consoleLogger: any = new DiagConsoleLogger();
consoleLogger[fName](`${fName} called %s`, 'param1');
assert.ok(
@ -103,7 +103,7 @@ describe('DiagConsoleLogger', () => {
);
});
it(`should log ${expectedConsoleMap[fName]} message with ${fName} call only`, () => {
it(`should log ${expectedConsoleMap[fName]} message with ${fName} call only`, function () {
const consoleLogger: any = new DiagConsoleLogger();
consoleLogger[fName](`${fName} called %s`, 'param1');
@ -126,7 +126,7 @@ describe('DiagConsoleLogger', () => {
});
consoleFuncs.forEach(cName => {
it(`should log ${fName} message even when console doesn't support ${cName} call before construction`, () => {
it(`should log ${fName} message even when console doesn't support ${cName} call before construction`, function () {
// @ts-expect-error removing a console property is not allowed by types
console[cName] = undefined;
const consoleLogger: any = new DiagConsoleLogger();
@ -141,7 +141,7 @@ describe('DiagConsoleLogger', () => {
}
});
it(`should log ${fName} message even when console doesn't support ${cName} call after construction`, () => {
it(`should log ${fName} message even when console doesn't support ${cName} call after construction`, function () {
const consoleLogger: any = new DiagConsoleLogger();
// @ts-expect-error removing a console property is not allowed by types
console[cName] = undefined;
@ -161,7 +161,7 @@ describe('DiagConsoleLogger', () => {
if (canMockConsole) {
diagLoggerFunctions.forEach(fName => {
const cName = expectedConsoleMap[fName];
it(`should not throw even when console is not supported for ${fName} call`, () => {
it(`should not throw even when console is not supported for ${fName} call`, function () {
// eslint-disable-next-line no-global-assign
(console as any) = undefined;
const consoleLogger: any = new DiagConsoleLogger();
@ -170,7 +170,7 @@ describe('DiagConsoleLogger', () => {
assert.deepStrictEqual(calledArgs.log, null);
});
it(`should not throw even when console is disabled after construction for ${fName} call`, () => {
it(`should not throw even when console is disabled after construction for ${fName} call`, function () {
const consoleLogger: any = new DiagConsoleLogger();
// eslint-disable-next-line no-global-assign
(console as any) = undefined;
@ -179,7 +179,7 @@ describe('DiagConsoleLogger', () => {
assert.deepStrictEqual(calledArgs.log, null);
});
it(`should not throw even when console is invalid after construction for ${fName} call`, () => {
it(`should not throw even when console is invalid after construction for ${fName} call`, function () {
const invalidConsole = {
debug: 1,
warn: 2,
@ -197,7 +197,7 @@ describe('DiagConsoleLogger', () => {
assert.deepStrictEqual(calledArgs.log, null);
});
it(`should not throw even when console is invalid before construction for ${fName} call`, () => {
it(`should not throw even when console is invalid before construction for ${fName} call`, function () {
const invalidConsole = {
debug: 1,
warn: 2,

View File

@ -31,7 +31,7 @@ export const diagLoggerFunctions = [
'error',
] as const;
describe('LogLevelFilter DiagLogger', () => {
describe('LogLevelFilter DiagLogger', function () {
const calledArgs: any = {
error: null,
warn: null,
@ -77,7 +77,7 @@ describe('LogLevelFilter DiagLogger', () => {
const levelMap: Array<{
message: string;
level: DiagLogLevel;
level: number;
ignoreFuncs: Array<keyof DiagLogger>;
}> = [
{ message: 'ALL', level: DiagLogLevel.ALL, ignoreFuncs: [] },
@ -117,10 +117,10 @@ describe('LogLevelFilter DiagLogger', () => {
];
levelMap.forEach(map => {
describe(`with ${map.message} log level`, () => {
describe(`with ${map.message} log level`, function () {
diagLoggerFunctions.forEach(fName => {
describe(`calling ${fName} message`, () => {
it('should log', () => {
describe(`calling ${fName} message`, function () {
it('should log', function () {
const testLogger = createLogLevelDiagLogger(map.level, dummyLogger);
testLogger[fName](`${fName} called %s`, 'param1');
diagLoggerFunctions.forEach(lName => {
@ -135,7 +135,7 @@ describe('LogLevelFilter DiagLogger', () => {
});
});
it('should be noop for null with explicit noop Logger log', () => {
it('should be noop for null with explicit noop Logger log', function () {
const testLogger = createLogLevelDiagLogger(
map.level,
createNoopDiagLogger()
@ -146,7 +146,7 @@ describe('LogLevelFilter DiagLogger', () => {
});
});
it('should be noop and not throw for null and no default Logger log', () => {
it('should be noop and not throw for null and no default Logger log', function () {
// @ts-expect-error null logger is not allowed
const testLogger = createLogLevelDiagLogger(map.level, null);
testLogger[fName](`${fName} called %s`, 'param1');
@ -155,7 +155,7 @@ describe('LogLevelFilter DiagLogger', () => {
});
});
it('should be noop and not throw for undefined and no default Logger log', () => {
it('should be noop and not throw for undefined and no default Logger log', function () {
// @ts-expect-error undefined logger is not allowed
const testLogger = createLogLevelDiagLogger(map.level, undefined);
testLogger[fName](`${fName} called %s`, 'param1');
@ -165,8 +165,8 @@ describe('LogLevelFilter DiagLogger', () => {
});
levelMap.forEach(masterLevelMap => {
describe(`when diag logger is set to ${masterLevelMap.message}`, () => {
it('diag.setLogger level is ignored when using a specific logger', () => {
describe(`when diag logger is set to ${masterLevelMap.message}`, function () {
it('diag.setLogger level is ignored when using a specific logger', function () {
diag.setLogger(dummyLogger, masterLevelMap.level);
const testLogger = createLogLevelDiagLogger(
@ -192,7 +192,7 @@ describe('LogLevelFilter DiagLogger', () => {
});
});
it('diag.setLogger level and logger should log', () => {
it('diag.setLogger level and logger should log', function () {
diag.setLogger(dummyLogger, map.level);
restoreCallHistory();
diag[fName](`${fName} called %s`, 'param1');
@ -208,7 +208,7 @@ describe('LogLevelFilter DiagLogger', () => {
});
});
it('should not throw with an invalid DiagLogger', () => {
it('should not throw with an invalid DiagLogger', function () {
const invalidLogger = {
debug: 1,
warn: 2,

View File

@ -15,7 +15,7 @@
*/
import * as assert from 'assert';
import sinon = require('sinon');
import * as sinon from 'sinon';
import { diag, DiagLogLevel } from '../../../src';
import { createNoopDiagLogger } from '../../../src/diag/internal/noopLogger';
import { DiagLogger } from '../../../src/diag/types';
@ -27,7 +27,7 @@ export const diagLoggerFunctions = [
'warn',
'error',
] as const;
describe('DiagLogger functions', () => {
describe('DiagLogger functions', function () {
const calledArgs: any = {
error: null,
warn: null,
@ -59,9 +59,9 @@ describe('DiagLogger functions', () => {
diag.disable();
});
describe('constructor', () => {
describe('constructor', function () {
diagLoggerFunctions.forEach(fName => {
it(`should log with ${fName} message`, () => {
it(`should log with ${fName} message`, function () {
const testLogger = dummyLogger;
testLogger[fName](`${fName} called %s`, 'param1');
diagLoggerFunctions.forEach(lName => {
@ -76,7 +76,7 @@ describe('DiagLogger functions', () => {
});
});
it(`diag should log with ${fName} message`, () => {
it(`diag should log with ${fName} message`, function () {
diag.setLogger(dummyLogger, DiagLogLevel.ALL);
restoreCallHistory();
diag[fName](`${fName} called %s`, 'param1');
@ -92,7 +92,7 @@ describe('DiagLogger functions', () => {
});
});
it(`NoopLogger should implement all functions and not throw when ${fName} called`, () => {
it(`NoopLogger should implement all functions and not throw when ${fName} called`, function () {
const testLogger = createNoopDiagLogger();
assert.ok(typeof testLogger[fName], 'function');
@ -101,12 +101,12 @@ describe('DiagLogger functions', () => {
});
});
describe('diag is used as the diag logger in setLogger', () => {
it('should not throw', () => {
describe('diag is used as the diag logger in setLogger', function () {
it('should not throw', function () {
diag.setLogger(diag);
});
it('should use the previously registered logger to log the error', () => {
it('should use the previously registered logger to log the error', function () {
const error = sinon.stub();
diag.setLogger({
verbose: () => {},

View File

@ -0,0 +1,157 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { wrapTracer } from '../../../../src/experimental';
import * as assert from 'assert';
import { NoopTracerProvider } from '../../../../src/trace/NoopTracerProvider';
import { NoopTracer } from '../../../../src/trace/NoopTracer';
import { Span } from '../../../../src';
import { Context, context, SpanOptions } from '../../../../src';
describe('SugaredTracer', function () {
class TestTracer extends NoopTracer {
public calls: IArguments[] = [];
override startActiveSpan<F extends (span: Span) => ReturnType<F>>(
name: string,
arg2?: SpanOptions,
arg3?: Context,
arg4?: F
): ReturnType<F> | undefined {
this.calls.push(arguments);
return super.startActiveSpan(name, arg2, arg3, arg4 as F);
}
override startSpan(
name: string,
options?: SpanOptions,
_context: Context = context.active()
): Span {
this.calls.push(arguments);
return super.startSpan(name, options, _context);
}
}
class TestTracerProvider extends NoopTracerProvider {
override getTracer() {
return new TestTracer();
}
}
const tracer = new TestTracerProvider().getTracer();
const sugaredTracer = wrapTracer(tracer);
afterEach(() => {
tracer.calls = [];
});
describe('wrapTracer()', function () {
it('still provides standard tracer functions', function () {
assert.ok(
typeof sugaredTracer.startSpan === 'function',
'startSpan is missing'
);
assert.ok(
typeof sugaredTracer.startActiveSpan === 'function',
'startActiveSpan is missing'
);
});
});
describe('withActiveSpan()', function () {
it('proxies value with minimal args', function () {
const result = sugaredTracer.withActiveSpan('test', span => {
return 'result';
});
assert.strictEqual(result, 'result', 'Unexpected result');
assert.strictEqual(tracer.calls.length, 2); // ensure that startActiveSpan and startSpan is called
});
it('proxies value with context', function () {
const result = sugaredTracer.withActiveSpan(
'test',
{ onException: e => e },
span => {
return 'result';
}
);
assert.strictEqual(result, 'result', 'Unexpected result');
assert.strictEqual(tracer.calls.length, 2); // ensure that startActiveSpan and startSpan is called
});
it('proxies value with context', function () {
const result = sugaredTracer.withActiveSpan(
'test',
{ onException: e => e },
context.active(),
span => {
return 'result';
}
);
assert.strictEqual(result, 'result', 'Unexpected result');
assert.strictEqual(tracer.calls.length, 2); // ensure that startActiveSpan and startSpan is called
});
it('returns promise if wrapped function returns promise', async function () {
const result = sugaredTracer.withActiveSpan('test', span => {
return Promise.resolve('result');
});
assert.ok(typeof result.then == 'function');
assert.strictEqual(await result, 'result', 'Unexpected result');
});
it('returns void', function () {
const result = sugaredTracer.withActiveSpan('test', (span: Span) => {
return;
});
assert.strictEqual(result, undefined);
});
});
describe('withSpan()', function () {
it('proxies value', function () {
const result = sugaredTracer.withSpan('test', span => {
return 'result';
});
assert.strictEqual(result, 'result', 'Unexpected result');
});
it('returns promise if wrapped function returns promise', async function () {
const result = sugaredTracer.withSpan('test', span => {
return Promise.resolve('result');
});
assert.ok(typeof result.then == 'function');
assert.strictEqual(await result, 'result', 'Unexpected result');
});
it('returns void', function () {
const result = sugaredTracer.withSpan('test', (span: Span) => {
return;
});
assert.strictEqual(result, undefined);
});
});
});

View File

@ -15,11 +15,11 @@
*/
import * as assert from 'assert';
import * as sinon from 'sinon';
import { getGlobal } from '../../../src/internal/global-utils';
import { _globalThis } from '../../../src/platform';
import { NoopContextManager } from '../../../src/context/NoopContextManager';
import { DiagLogLevel } from '../../../src/diag/types';
import sinon = require('sinon');
const api1 = require('../../../src') as typeof import('../../../src');
@ -41,7 +41,7 @@ const getMockLogger = () => ({
error: sinon.spy(),
});
describe('Global Utils', () => {
describe('Global Utils', function () {
// prove they are separate instances
assert.notEqual(api1, api2);
// that return separate noop instances to start
@ -59,7 +59,7 @@ describe('Global Utils', () => {
delete _globalThis[Symbol.for(GLOBAL_API_SYMBOL_KEY)];
});
it('should change the global context manager', () => {
it('should change the global context manager', function () {
const original = api1.context['_getContextManager']();
const newContextManager = new NoopContextManager();
api1.context.setGlobalContextManager(newContextManager);
@ -67,7 +67,7 @@ describe('Global Utils', () => {
assert.strictEqual(api1.context['_getContextManager'](), newContextManager);
});
it('should load an instance from one which was set in the other', () => {
it('should load an instance from one which was set in the other', function () {
api1.context.setGlobalContextManager(new NoopContextManager());
assert.strictEqual(
api1.context['_getContextManager'](),
@ -75,7 +75,7 @@ describe('Global Utils', () => {
);
});
it('should disable both if one is disabled', () => {
it('should disable both if one is disabled', function () {
const manager = new NoopContextManager();
api1.context.setGlobalContextManager(manager);
@ -84,7 +84,7 @@ describe('Global Utils', () => {
assert.notStrictEqual(manager, api1.context['_getContextManager']());
});
it('should not register if the version is a mismatch', () => {
it('should not register if the version is a mismatch', function () {
const logger1 = getMockLogger();
const logger2 = getMockLogger();
@ -102,7 +102,7 @@ describe('Global Utils', () => {
sinon.assert.notCalled(logger2.warn);
});
it('should debug log registrations', () => {
it('should debug log registrations', function () {
const logger = getMockLogger();
api1.diag.setLogger(logger, DiagLogLevel.DEBUG);
@ -114,7 +114,7 @@ describe('Global Utils', () => {
sinon.assert.calledTwice(logger.debug);
});
it('should log an error if there is a duplicate registration', () => {
it('should log an error if there is a duplicate registration', function () {
const logger = getMockLogger();
api1.diag.setLogger(logger);
@ -130,7 +130,7 @@ describe('Global Utils', () => {
);
});
it('should allow duplicate registration of the diag logger', () => {
it('should allow duplicate registration of the diag logger', function () {
const logger1 = getMockLogger();
const logger2 = getMockLogger();

View File

@ -21,22 +21,22 @@ import {
} from '../../../src/internal/semver';
import { VERSION } from '../../../src/version';
describe('semver', () => {
it('should be compatible if versions are equal', () => {
describe('semver', function () {
it('should be compatible if versions are equal', function () {
assert.ok(isCompatible(VERSION));
});
it('returns false if own version cannot be parsed', () => {
it('returns false if own version cannot be parsed', function () {
const check = _makeCompatibilityCheck('this is not semver');
assert.ok(!check('1.0.0'));
});
it('incompatible if other version cannot be parsed', () => {
it('incompatible if other version cannot be parsed', function () {
const check = _makeCompatibilityCheck('0.1.2');
assert.ok(!check('this is not semver'));
});
describe('>= 1.0.0', () => {
describe('>= 1.0.0', function () {
const globalVersion = '5.5.5';
const vers: [string, boolean][] = [
// same major/minor run should be compatible
@ -81,7 +81,7 @@ describe('semver', () => {
test(globalVersion, vers);
});
describe('< 1.0.0', () => {
describe('< 1.0.0', function () {
const globalVersion = '0.5.5';
const vers: [string, boolean][] = [
// same minor/patch should be compatible
@ -119,7 +119,7 @@ describe('semver', () => {
test(globalVersion, vers);
});
describe('global version is prerelease', () => {
describe('global version is prerelease', function () {
const globalVersion = '1.0.0-rc.3';
const vers: [string, boolean][] = [
// must match exactly
@ -135,11 +135,11 @@ describe('semver', () => {
});
function test(globalVersion: string, vers: [string, boolean][]) {
describe(`global version is ${globalVersion}`, () => {
describe(`global version is ${globalVersion}`, function () {
for (const [version, compatible] of vers) {
it(`API version ${version} ${
compatible ? 'should' : 'should not'
} be able to access global`, () => {
} be able to access global`, function () {
const check = _makeCompatibilityCheck(version);
assert.strictEqual(check(globalVersion), compatible);
});

View File

@ -17,13 +17,18 @@
import * as assert from 'assert';
import { VERSION } from '../../../src/version';
describe('version', () => {
it('should have generated VERSION.ts', () => {
describe('version', function () {
it('should have generated VERSION.ts', function () {
// Skip in case we're not running in Node.js
if (global.process?.versions?.node === undefined) {
this.skip();
}
const pjson = require('../../../package.json');
assert.strictEqual(pjson.version, VERSION);
});
it('prerelease tag versions are banned', () => {
it('prerelease tag versions are banned', function () {
// see https://github.com/open-telemetry/opentelemetry-js-api/issues/74
assert.ok(VERSION.match(/^\d+\.\d+\.\d+$/));
});

View File

@ -16,16 +16,16 @@
import { Counter, UpDownCounter, Histogram } from '../../../src';
describe('Metric', () => {
describe('Counter', () => {
it('enable not to define any type', () => {
describe('Metric', function () {
describe('Counter', function () {
it('enable not to define any type', function () {
const counter: Counter = {
add(_value: number, _attribute: unknown) {},
};
counter.add(1, { 'some-attribute': 'value' });
});
it('enable to use with type', () => {
it('enable to use with type', function () {
type Attributes = {
'some-attribute': string;
};
@ -35,27 +35,27 @@ describe('Metric', () => {
counter.add(1, { 'some-attribute': 'value' });
});
it('disable wrong attributes by typing', () => {
it('disable wrong attributes by typing', function () {
type Attributes = {
'some-attribute': string;
};
const counter: Counter<Attributes> = {
add(_value: number, _attribute: Attributes) {},
};
// @ts-expect-error Expacting the type of Attributes
// @ts-expect-error Expecting the type of Attributes
counter.add(1, { 'another-attribute': 'value' });
});
});
describe('UpDownCounter', () => {
it('enable not to define any type', () => {
describe('UpDownCounter', function () {
it('enable not to define any type', function () {
const counter: UpDownCounter = {
add(_value: number, _attribute: unknown) {},
};
counter.add(1, { 'some-attribute': 'value' });
});
it('enable to use with type', () => {
it('enable to use with type', function () {
type Attributes = {
'some-attribute': string;
};
@ -65,27 +65,27 @@ describe('Metric', () => {
counter.add(1, { 'some-attribute': 'value' });
});
it('disable wrong attributes by typing', () => {
it('disable wrong attributes by typing', function () {
type Attributes = {
'some-attribute': string;
};
const counter: UpDownCounter<Attributes> = {
add(_value: number, _attribute: Attributes) {},
};
// @ts-expect-error Expacting the type of Attributes
// @ts-expect-error Expecting the type of Attributes
counter.add(1, { 'another-attribute': 'value' });
});
});
describe('Histogram', () => {
it('enable not to define any type', () => {
describe('Histogram', function () {
it('enable not to define any type', function () {
const counter: Histogram = {
record(_value: number, _attribute: unknown) {},
};
counter.record(1, { 'some-attribute': 'value' });
});
it('enable to use with type', () => {
it('enable to use with type', function () {
type Attributes = {
'some-attribute': string;
};
@ -95,14 +95,14 @@ describe('Metric', () => {
counter.record(1, { 'some-attribute': 'value' });
});
it('disable wrong attributes by typing', () => {
it('disable wrong attributes by typing', function () {
type Attributes = {
'some-attribute': string;
};
const counter: Histogram<Attributes> = {
record(_value: number, _attribute: Attributes) {},
};
// @ts-expect-error Expacting the type of Attributes
// @ts-expect-error Expecting the type of Attributes
counter.record(1, { 'another-attribute': 'value' });
});
});

View File

@ -24,6 +24,7 @@ import {
NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC,
NOOP_UP_DOWN_COUNTER_METRIC,
createNoopMeter,
NOOP_GAUGE_METRIC,
} from '../../../src/metrics/NoopMeter';
import { NoopMeterProvider } from '../../../src/metrics/NoopMeterProvider';
@ -33,13 +34,13 @@ const options = {
description: 'the testing package',
};
describe('NoopMeter', () => {
it('constructor should not crash', () => {
describe('NoopMeter', function () {
it('constructor should not crash', function () {
const meter = new NoopMeterProvider().getMeter('test-noop');
assert(meter instanceof NoopMeter);
assert.ok(meter instanceof NoopMeter);
});
it('counter should not crash', () => {
it('counter should not crash', function () {
const meter = new NoopMeterProvider().getMeter('test-noop');
const counter = meter.createCounter('some-name');
@ -53,7 +54,7 @@ describe('NoopMeter', () => {
assert.strictEqual(counterWithOptions, NOOP_COUNTER_METRIC);
});
it('histogram should not crash', () => {
it('histogram should not crash', function () {
const meter = new NoopMeterProvider().getMeter('test-noop');
const histogram = meter.createHistogram('some-name');
histogram.record(1, attributes);
@ -65,7 +66,7 @@ describe('NoopMeter', () => {
assert.strictEqual(histogramWithOptions, NOOP_HISTOGRAM_METRIC);
});
it('up down counter should not crash', () => {
it('up down counter should not crash', function () {
const meter = new NoopMeterProvider().getMeter('test-noop');
const upDownCounter = meter.createUpDownCounter('some-name');
upDownCounter.add(1, attributes);
@ -80,7 +81,7 @@ describe('NoopMeter', () => {
assert.strictEqual(upDownCounterWithOptions, NOOP_UP_DOWN_COUNTER_METRIC);
});
it('observable counter should not crash', () => {
it('observable counter should not crash', function () {
const meter = new NoopMeterProvider().getMeter('test-noop');
const observableCounter = meter.createObservableCounter('some-name');
observableCounter.addCallback(() => {});
@ -98,7 +99,7 @@ describe('NoopMeter', () => {
);
});
it('observable gauge should not crash', () => {
it('observable gauge should not crash', function () {
const meter = new NoopMeterProvider().getMeter('test-noop');
const observableGauge = meter.createObservableGauge('some-name');
observableGauge.addCallback(() => {});
@ -116,7 +117,18 @@ describe('NoopMeter', () => {
);
});
it('observable up down counter should not crash', () => {
it('gauge should not crash', function () {
const meter = new NoopMeterProvider().getMeter('test-noop');
const observableGauge = meter.createGauge('some-name');
// ensure the correct noop const is returned
assert.strictEqual(observableGauge, NOOP_GAUGE_METRIC);
const gaugeWithOptions = meter.createGauge('some-name', options);
assert.strictEqual(gaugeWithOptions, NOOP_GAUGE_METRIC);
});
it('observable up down counter should not crash', function () {
const meter = new NoopMeterProvider().getMeter('test-noop');
const observableUpDownCounter =
meter.createObservableUpDownCounter('some-name');
@ -136,15 +148,15 @@ describe('NoopMeter', () => {
);
});
it('batch callback should not crash', () => {
it('batch callback should not crash', function () {
const meter = new NoopMeterProvider().getMeter('test-noop');
meter.addBatchObservableCallback(() => {}, []);
meter.removeBatchObservableCallback(() => {}, []);
});
});
describe('createNoopMeter', () => {
it('should return NoopMeter', () => {
describe('createNoopMeter', function () {
it('should return NoopMeter', function () {
assert.ok(createNoopMeter() instanceof NoopMeter);
});
});

Some files were not shown because too many files have changed in this diff Show More