Skip to content

Commit 5a00e03

Browse files
committed
Merge branch 'main' into esbuild-plugin
2 parents 943dca1 + 66e6ce4 commit 5a00e03

File tree

386 files changed

+16878
-19120
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

386 files changed

+16878
-19120
lines changed

.github/component-label-map.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ pkg:instrumentation-aws-lambda:
6161
- changed-files:
6262
- any-glob-to-any-file:
6363
- plugins/node/opentelemetry-instrumentation-aws-lambda/**
64-
- propagators/opentelemetry-propagator-aws-xray/**
6564
pkg:instrumentation-aws-sdk:
6665
- changed-files:
6766
- any-glob-to-any-file:
@@ -72,7 +71,7 @@ pkg:instrumentation-bunyan:
7271
- changed-files:
7372
- any-glob-to-any-file:
7473
- plugins/node/opentelemetry-instrumentation-bunyan/**
75-
pkg:instrumentation-cassandra:
74+
pkg:instrumentation-cassandra-driver:
7675
- changed-files:
7776
- any-glob-to-any-file:
7877
- plugins/node/opentelemetry-instrumentation-cassandra/**
@@ -225,6 +224,10 @@ pkg:instrumentation-tedious:
225224
- any-glob-to-any-file:
226225
- plugins/node/instrumentation-tedious/**
227226
- packages/opentelemetry-test-utils/**
227+
pkg:instrumentation-undici:
228+
- changed-files:
229+
- any-glob-to-any-file:
230+
- plugins/node/instrumentation-undici/**
228231
pkg:instrumentation-user-interaction:
229232
- changed-files:
230233
- any-glob-to-any-file:
@@ -242,10 +245,6 @@ pkg:propagation-utils:
242245
- any-glob-to-any-file:
243246
- packages/opentelemetry-propagation-utils/**
244247
- packages/opentelemetry-test-utils/**
245-
pkg:propagator-aws-xray:
246-
- changed-files:
247-
- any-glob-to-any-file:
248-
- propagators/opentelemetry-propagator-aws-xray/**
249248
pkg:propagator-grpc-census-binary:
250249
- changed-files:
251250
- any-glob-to-any-file:

.github/component_owners.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ components:
3030
- pichlermarc
3131
packages/esbuild-plugin-node:
3232
- drewcorlin1
33+
packages/baggage-span-processor:
34+
- mikegoldsmith
35+
- jamiedanielson
3336
packages/opentelemetry-host-metrics:
3437
- legendecas
3538
packages/opentelemetry-id-generator-aws-xray:
@@ -141,8 +144,6 @@ components:
141144
- obecny
142145
plugins/web/opentelemetry-plugin-react-load:
143146
- martinkuba
144-
propagators/opentelemetry-propagator-aws-xray:
145-
- carolabadeer
146147
propagators/opentelemetry-propagator-grpc-census-binary: []
147148
# Unmaintained?
148149
propagators/opentelemetry-propagator-instana:

.github/workflows/release-please.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,15 @@ jobs:
5454
5555
# get main again
5656
- name: Checkout Repository
57+
# only checkout if a release has been created
58+
if: ${{ steps.release.outputs.releases_created }}
5759
uses: actions/checkout@v4
5860
with:
5961
fetch-depth: 0
6062

6163
- name: Rebuild Packages
64+
# only rebuild if a release has been created
65+
if: ${{ steps.release.outputs.releases_created }}
6266
run: |
6367
npm ci
6468
npm run compile
@@ -67,6 +71,8 @@ jobs:
6771
# need to publish all unpublished versions to npm here
6872
# See: https://github.com/lerna/lerna/tree/main/commands/publish#bump-from-package
6973
- name: Publish to npm
74+
# only publish if a release has been created
75+
if: ${{ steps.release.outputs.releases_created }}
7076
env:
7177
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
7278
run: npx lerna publish from-package --no-push --no-private --no-git-tag-version --no-verify-access --yes

.github/workflows/test-all-versions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
--health-timeout 5s
5454
--health-retries 5
5555
postgres:
56-
image: postgres:15-alpine
56+
image: postgres:16-alpine
5757
env:
5858
POSTGRES_USER: postgres
5959
POSTGRES_DB: otel_pg_database

.github/workflows/unit-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
--health-timeout 5s
5252
--health-retries 5
5353
postgres:
54-
image: postgres:15-alpine
54+
image: postgres:16-alpine
5555
env:
5656
POSTGRES_USER: postgres
5757
POSTGRES_DB: otel_pg_database

.release-please-manifest.json

Lines changed: 64 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,66 @@
11
{
2-
"detectors/node/opentelemetry-resource-detector-alibaba-cloud": "0.28.8",
3-
"detectors/node/opentelemetry-resource-detector-aws": "1.4.1",
4-
"detectors/node/opentelemetry-resource-detector-azure": "0.2.6",
5-
"detectors/node/opentelemetry-resource-detector-container": "0.3.8",
6-
"detectors/node/opentelemetry-resource-detector-gcp": "0.29.8",
7-
"detectors/node/opentelemetry-resource-detector-github": "0.28.1",
8-
"detectors/node/opentelemetry-resource-detector-instana": "0.8.0",
9-
"metapackages/auto-instrumentations-node": "0.44.0",
10-
"metapackages/auto-instrumentations-web": "0.38.0",
2+
3+
"detectors/node/opentelemetry-resource-detector-alibaba-cloud": "0.28.9",
4+
"detectors/node/opentelemetry-resource-detector-aws": "1.4.2",
5+
"detectors/node/opentelemetry-resource-detector-azure": "0.2.7",
6+
"detectors/node/opentelemetry-resource-detector-container": "0.3.9",
7+
"detectors/node/opentelemetry-resource-detector-gcp": "0.29.9",
8+
"detectors/node/opentelemetry-resource-detector-github": "0.28.2",
9+
"detectors/node/opentelemetry-resource-detector-instana": "0.9.0",
10+
"metapackages/auto-instrumentations-node": "0.46.0",
11+
"metapackages/auto-instrumentations-web": "0.39.0",
12+
"packages/baggage-span-processor": "0.1.0",
1113
"packages/esbuild-plugin-node": "0.1.0",
12-
"packages/opentelemetry-host-metrics": "0.35.0",
13-
"packages/opentelemetry-id-generator-aws-xray": "1.2.1",
14-
"packages/opentelemetry-propagation-utils": "0.30.8",
15-
"packages/opentelemetry-redis-common": "0.36.1",
16-
"packages/opentelemetry-sql-common": "0.40.0",
17-
"packages/opentelemetry-test-utils": "0.38.0",
18-
"packages/winston-transport": "0.2.0",
19-
"plugins/node/instrumentation-amqplib": "0.36.0",
20-
"plugins/node/instrumentation-cucumber": "0.5.0",
21-
"plugins/node/instrumentation-dataloader": "0.8.0",
22-
"plugins/node/instrumentation-fs": "0.11.0",
23-
"plugins/node/instrumentation-lru-memoizer": "0.36.0",
24-
"plugins/node/instrumentation-mongoose": "0.37.0",
25-
"plugins/node/instrumentation-runtime-node": "0.3.0",
26-
"plugins/node/instrumentation-socket.io": "0.38.0",
27-
"plugins/node/instrumentation-tedious": "0.9.0",
28-
"plugins/node/instrumentation-undici": "0.1.0",
29-
"plugins/node/opentelemetry-instrumentation-aws-lambda": "0.40.0",
30-
"plugins/node/opentelemetry-instrumentation-aws-sdk": "0.40.0",
31-
"plugins/node/opentelemetry-instrumentation-bunyan": "0.37.0",
32-
"plugins/node/opentelemetry-instrumentation-cassandra": "0.37.0",
33-
"plugins/node/opentelemetry-instrumentation-connect": "0.35.0",
34-
"plugins/node/opentelemetry-instrumentation-dns": "0.35.0",
35-
"plugins/node/opentelemetry-instrumentation-express": "0.37.0",
36-
"plugins/node/opentelemetry-instrumentation-fastify": "0.35.0",
37-
"plugins/node/opentelemetry-instrumentation-generic-pool": "0.35.0",
38-
"plugins/node/opentelemetry-instrumentation-graphql": "0.39.0",
39-
"plugins/node/opentelemetry-instrumentation-hapi": "0.36.0",
40-
"plugins/node/opentelemetry-instrumentation-ioredis": "0.39.0",
41-
"plugins/node/opentelemetry-instrumentation-knex": "0.35.0",
42-
"plugins/node/opentelemetry-instrumentation-koa": "0.39.0",
43-
"plugins/node/opentelemetry-instrumentation-memcached": "0.35.0",
44-
"plugins/node/opentelemetry-instrumentation-mongodb": "0.42.0",
45-
"plugins/node/opentelemetry-instrumentation-mysql": "0.37.0",
46-
"plugins/node/opentelemetry-instrumentation-mysql2": "0.37.0",
47-
"plugins/node/opentelemetry-instrumentation-nestjs-core": "0.36.0",
48-
"plugins/node/opentelemetry-instrumentation-net": "0.35.0",
49-
"plugins/node/opentelemetry-instrumentation-pg": "0.40.0",
50-
"plugins/node/opentelemetry-instrumentation-pino": "0.37.0",
51-
"plugins/node/opentelemetry-instrumentation-redis": "0.38.0",
52-
"plugins/node/opentelemetry-instrumentation-redis-4": "0.38.0",
53-
"plugins/node/opentelemetry-instrumentation-restify": "0.37.0",
54-
"plugins/node/opentelemetry-instrumentation-router": "0.36.0",
55-
"plugins/node/opentelemetry-instrumentation-winston": "0.36.0",
56-
"plugins/web/opentelemetry-instrumentation-document-load": "0.37.0",
57-
"plugins/web/opentelemetry-instrumentation-long-task": "0.37.0",
58-
"plugins/web/opentelemetry-instrumentation-user-interaction": "0.37.0",
59-
"plugins/web/opentelemetry-plugin-react-load": "0.30.0",
60-
"propagators/opentelemetry-propagator-aws-xray": "1.3.1",
61-
"propagators/opentelemetry-propagator-grpc-census-binary": "0.27.1",
62-
"propagators/opentelemetry-propagator-instana": "0.3.1",
63-
"propagators/opentelemetry-propagator-ot-trace": "0.27.1"
64-
}
14+
"packages/opentelemetry-host-metrics": "0.35.1",
15+
"packages/opentelemetry-id-generator-aws-xray": "1.2.2",
16+
"packages/opentelemetry-propagation-utils": "0.30.9",
17+
"packages/opentelemetry-redis-common": "0.36.2",
18+
"packages/opentelemetry-sql-common": "0.40.1",
19+
"packages/opentelemetry-test-utils": "0.39.0",
20+
"packages/winston-transport": "0.3.0",
21+
"plugins/node/instrumentation-amqplib": "0.37.0",
22+
"plugins/node/instrumentation-cucumber": "0.6.0",
23+
"plugins/node/instrumentation-dataloader": "0.9.0",
24+
"plugins/node/instrumentation-fs": "0.12.0",
25+
"plugins/node/instrumentation-lru-memoizer": "0.37.0",
26+
"plugins/node/instrumentation-mongoose": "0.38.1",
27+
"plugins/node/instrumentation-runtime-node": "0.4.0",
28+
"plugins/node/instrumentation-socket.io": "0.39.0",
29+
"plugins/node/instrumentation-tedious": "0.10.1",
30+
"plugins/node/instrumentation-undici": "0.2.0",
31+
"plugins/node/opentelemetry-instrumentation-aws-lambda": "0.41.0",
32+
"plugins/node/opentelemetry-instrumentation-aws-sdk": "0.41.0",
33+
"plugins/node/opentelemetry-instrumentation-bunyan": "0.38.0",
34+
"plugins/node/opentelemetry-instrumentation-cassandra": "0.38.0",
35+
"plugins/node/opentelemetry-instrumentation-connect": "0.36.0",
36+
"plugins/node/opentelemetry-instrumentation-dns": "0.36.1",
37+
"plugins/node/opentelemetry-instrumentation-express": "0.38.0",
38+
"plugins/node/opentelemetry-instrumentation-fastify": "0.36.1",
39+
"plugins/node/opentelemetry-instrumentation-generic-pool": "0.36.0",
40+
"plugins/node/opentelemetry-instrumentation-graphql": "0.40.0",
41+
"plugins/node/opentelemetry-instrumentation-hapi": "0.38.0",
42+
"plugins/node/opentelemetry-instrumentation-ioredis": "0.40.0",
43+
"plugins/node/opentelemetry-instrumentation-knex": "0.36.1",
44+
"plugins/node/opentelemetry-instrumentation-koa": "0.40.0",
45+
"plugins/node/opentelemetry-instrumentation-memcached": "0.36.0",
46+
"plugins/node/opentelemetry-instrumentation-mongodb": "0.43.0",
47+
"plugins/node/opentelemetry-instrumentation-mysql": "0.38.1",
48+
"plugins/node/opentelemetry-instrumentation-mysql2": "0.38.1",
49+
"plugins/node/opentelemetry-instrumentation-nestjs-core": "0.37.1",
50+
"plugins/node/opentelemetry-instrumentation-net": "0.36.0",
51+
"plugins/node/opentelemetry-instrumentation-pg": "0.41.0",
52+
"plugins/node/opentelemetry-instrumentation-pino": "0.39.0",
53+
"plugins/node/opentelemetry-instrumentation-redis": "0.39.1",
54+
"plugins/node/opentelemetry-instrumentation-redis-4": "0.39.0",
55+
"plugins/node/opentelemetry-instrumentation-restify": "0.38.0",
56+
"plugins/node/opentelemetry-instrumentation-router": "0.37.0",
57+
"plugins/node/opentelemetry-instrumentation-winston": "0.37.0",
58+
"plugins/web/opentelemetry-instrumentation-document-load": "0.38.0",
59+
"plugins/web/opentelemetry-instrumentation-long-task": "0.38.0",
60+
"plugins/web/opentelemetry-instrumentation-user-interaction": "0.38.0",
61+
"plugins/web/opentelemetry-plugin-react-load": "0.30.1",
62+
"propagators/opentelemetry-propagator-grpc-census-binary": "0.27.2",
63+
"propagators/opentelemetry-propagator-instana": "0.3.2",
64+
"propagators/opentelemetry-propagator-ot-trace": "0.27.2"
65+
}
66+

GUIDELINES.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,36 @@ To support this use case, you can choose one of the following options:
164164
};
165165
...
166166
```
167+
168+
## Diag Logging
169+
170+
The OpenTelemetry diagnostic logging channel can be used to troubleshoot issues with instrumentation packages.
171+
172+
### Patching Messages
173+
174+
When OpenTelemetry is installed in a user application, and expected spans are missing from generated traces, it is often useful to differentiate between the following scenarios:
175+
176+
- The instrumentation is not auto loaded - due to issue with the require/import interception, an unsupported version of the instrumented package, or some other issue. This knowledge can pin-point the issue to the instrumentation package.
177+
- The instrumentation patch was applied but expected spans are missing -- this can suggest an issue with instrumented package logic, configuration, limits, otel sdk, or other issues.
178+
179+
It can also be useful to know when the instrumentation is loaded and patched, to understand the order of operations in the application.
180+
181+
Instrumentation packages should use the `@opentelemetry/instrumentation` package `InstrumentationBase` class to register patches and unpatch callbacks for specific require/import of the instrumented package, it's dependency or an internal module file. When this mechanism is used, the base class will automatically emit a debug message on instrumentation diag component logger, looking like this:
182+
183+
```shell
184+
@opentelemetry/instrumentation-foo Applying instrumentation patch for module on require hook {
185+
module: 'foo',
186+
version: '1.2.3',
187+
baseDir: '<your directory>/node_modules/foo'
188+
}
189+
```
190+
191+
Instrumentation should not add additional debug messages for triggering the patching and unpatching callbacks, as the base class will handle this.
192+
193+
Instrumentation may add additional patch/unpatch messages for specific functions if it is expected to help in troubleshooting issues with the instrumentation. Few examples:
194+
195+
- If the patch logic is conditional, and user can benefit from ensuring the condition is met and the patch happened. `koa` patching logic examine an object and branch between patching it as router vs middleware, which is applied at runtime. `aws-lambda` will abort patching if the environment is not configured properly.
196+
- When the patch is not applied directly on a `moduleExports` object in the `InstrumentationBase` callbacks, but rather from an event in the package, like creating new client instance, registering a listener, etc. `fastify` instrumentation applies a patch when a hook is added to the fastify app instance, which is patched from `moduleExports`.
197+
- In situations where the patch logic is not trivial and it helps to specify patch events in the right context and nuances. `aws-lambda` logs additional properties extracted from the lambda framework and exposes them for troubleshooting.
198+
199+
The cases above are not covered by the base class and offer additional context to the user troubleshooting an issue with the instrumentation.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright [2022] OpenTelemetry Authors
189+
Copyright [yyyy] [name of copyright owner]
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

archive/opentelemetry-browser-extension-autoinjection/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright [2022] OpenTelemetry Authors
189+
Copyright [yyyy] [name of copyright owner]
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

detectors/node/opentelemetry-resource-detector-alibaba-cloud/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,20 @@
7272
* devDependencies
7373
* @opentelemetry/contrib-test-utils bumped from ^0.36.0 to ^0.37.0
7474

75+
## [0.28.9](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-alibaba-cloud-v0.28.8...resource-detector-alibaba-cloud-v0.28.9) (2024-04-25)
76+
77+
78+
### Bug Fixes
79+
80+
* revert modifications to Apache license ([#2105](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2105)) ([4590c8d](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4590c8df184bbcb9bd67ce1111df9f25f865ccf2))
81+
82+
83+
### Dependencies
84+
85+
* The following workspace dependencies were updated
86+
* devDependencies
87+
* @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.0
88+
7589
## [0.28.8](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-alibaba-cloud-v0.28.7...resource-detector-alibaba-cloud-v0.28.8) (2024-04-03)
7690

7791

0 commit comments

Comments
 (0)