Skip to content

Commit

Permalink
Merge branch 'main' into aws-cloud-attrs
Browse files Browse the repository at this point in the history
  • Loading branch information
trentm authored May 2, 2024
2 parents 033ccb0 + 16f920a commit 9ec3c9f
Show file tree
Hide file tree
Showing 364 changed files with 6,755 additions and 4,762 deletions.
7 changes: 1 addition & 6 deletions .github/component-label-map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ pkg:instrumentation-aws-lambda:
- changed-files:
- any-glob-to-any-file:
- plugins/node/opentelemetry-instrumentation-aws-lambda/**
- propagators/opentelemetry-propagator-aws-xray/**
pkg:instrumentation-aws-sdk:
- changed-files:
- any-glob-to-any-file:
Expand All @@ -72,7 +71,7 @@ pkg:instrumentation-bunyan:
- changed-files:
- any-glob-to-any-file:
- plugins/node/opentelemetry-instrumentation-bunyan/**
pkg:instrumentation-cassandra:
pkg:instrumentation-cassandra-driver:
- changed-files:
- any-glob-to-any-file:
- plugins/node/opentelemetry-instrumentation-cassandra/**
Expand Down Expand Up @@ -246,10 +245,6 @@ pkg:propagation-utils:
- any-glob-to-any-file:
- packages/opentelemetry-propagation-utils/**
- packages/opentelemetry-test-utils/**
pkg:propagator-aws-xray:
- changed-files:
- any-glob-to-any-file:
- propagators/opentelemetry-propagator-aws-xray/**
pkg:propagator-grpc-census-binary:
- changed-files:
- any-glob-to-any-file:
Expand Down
5 changes: 3 additions & 2 deletions .github/component_owners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ components:
- pichlermarc
- legendecas
- blumamir
packages/baggage-span-processor:
- mikegoldsmith
- jamiedanielson
packages/opentelemetry-host-metrics:
- legendecas
packages/opentelemetry-id-generator-aws-xray:
Expand Down Expand Up @@ -138,8 +141,6 @@ components:
- obecny
plugins/web/opentelemetry-plugin-react-load:
- martinkuba
propagators/opentelemetry-propagator-aws-xray:
- carolabadeer
propagators/opentelemetry-propagator-grpc-census-binary: []
# Unmaintained?
propagators/opentelemetry-propagator-instana:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,15 @@ jobs:
# get main again
- name: Checkout Repository
# only checkout if a release has been created
if: ${{ steps.release.outputs.releases_created }}
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Rebuild Packages
# only rebuild if a release has been created
if: ${{ steps.release.outputs.releases_created }}
run: |
npm ci
npm run compile
Expand All @@ -67,6 +71,8 @@ jobs:
# need to publish all unpublished versions to npm here
# See: https://github.com/lerna/lerna/tree/main/commands/publish#bump-from-package
- name: Publish to npm
# only publish if a release has been created
if: ${{ steps.release.outputs.releases_created }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: npx lerna publish from-package --no-push --no-private --no-git-tag-version --no-verify-access --yes
2 changes: 1 addition & 1 deletion .github/workflows/test-all-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
--health-timeout 5s
--health-retries 5
postgres:
image: postgres:15-alpine
image: postgres:16-alpine
env:
POSTGRES_USER: postgres
POSTGRES_DB: otel_pg_database
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
--health-timeout 5s
--health-retries 5
postgres:
image: postgres:15-alpine
image: postgres:16-alpine
env:
POSTGRES_USER: postgres
POSTGRES_DB: otel_pg_database
Expand Down
122 changes: 61 additions & 61 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,63 +1,63 @@
{
"detectors/node/opentelemetry-resource-detector-alibaba-cloud": "0.28.8",
"detectors/node/opentelemetry-resource-detector-aws": "1.4.1",
"detectors/node/opentelemetry-resource-detector-azure": "0.2.6",
"detectors/node/opentelemetry-resource-detector-container": "0.3.8",
"detectors/node/opentelemetry-resource-detector-gcp": "0.29.8",
"detectors/node/opentelemetry-resource-detector-github": "0.28.1",
"detectors/node/opentelemetry-resource-detector-instana": "0.8.0",
"metapackages/auto-instrumentations-node": "0.44.0",
"metapackages/auto-instrumentations-web": "0.38.0",
"packages/opentelemetry-host-metrics": "0.35.0",
"packages/opentelemetry-id-generator-aws-xray": "1.2.1",
"packages/opentelemetry-propagation-utils": "0.30.8",
"packages/opentelemetry-redis-common": "0.36.1",
"packages/opentelemetry-sql-common": "0.40.0",
"packages/opentelemetry-test-utils": "0.38.0",
"packages/winston-transport": "0.2.0",
"plugins/node/instrumentation-amqplib": "0.36.0",
"plugins/node/instrumentation-cucumber": "0.5.0",
"plugins/node/instrumentation-dataloader": "0.8.0",
"plugins/node/instrumentation-fs": "0.11.0",
"plugins/node/instrumentation-lru-memoizer": "0.36.0",
"plugins/node/instrumentation-mongoose": "0.37.0",
"plugins/node/instrumentation-runtime-node": "0.3.0",
"plugins/node/instrumentation-socket.io": "0.38.0",
"plugins/node/instrumentation-tedious": "0.9.0",
"plugins/node/instrumentation-undici": "0.1.0",
"plugins/node/opentelemetry-instrumentation-aws-lambda": "0.40.0",
"plugins/node/opentelemetry-instrumentation-aws-sdk": "0.40.0",
"plugins/node/opentelemetry-instrumentation-bunyan": "0.37.0",
"plugins/node/opentelemetry-instrumentation-cassandra": "0.37.0",
"plugins/node/opentelemetry-instrumentation-connect": "0.35.0",
"plugins/node/opentelemetry-instrumentation-dns": "0.35.0",
"plugins/node/opentelemetry-instrumentation-express": "0.37.0",
"plugins/node/opentelemetry-instrumentation-fastify": "0.35.0",
"plugins/node/opentelemetry-instrumentation-generic-pool": "0.35.0",
"plugins/node/opentelemetry-instrumentation-graphql": "0.39.0",
"plugins/node/opentelemetry-instrumentation-hapi": "0.36.0",
"plugins/node/opentelemetry-instrumentation-ioredis": "0.39.0",
"plugins/node/opentelemetry-instrumentation-knex": "0.35.0",
"plugins/node/opentelemetry-instrumentation-koa": "0.39.0",
"plugins/node/opentelemetry-instrumentation-memcached": "0.35.0",
"plugins/node/opentelemetry-instrumentation-mongodb": "0.42.0",
"plugins/node/opentelemetry-instrumentation-mysql": "0.37.0",
"plugins/node/opentelemetry-instrumentation-mysql2": "0.37.0",
"plugins/node/opentelemetry-instrumentation-nestjs-core": "0.36.0",
"plugins/node/opentelemetry-instrumentation-net": "0.35.0",
"plugins/node/opentelemetry-instrumentation-pg": "0.40.0",
"plugins/node/opentelemetry-instrumentation-pino": "0.37.0",
"plugins/node/opentelemetry-instrumentation-redis": "0.38.0",
"plugins/node/opentelemetry-instrumentation-redis-4": "0.38.0",
"plugins/node/opentelemetry-instrumentation-restify": "0.37.0",
"plugins/node/opentelemetry-instrumentation-router": "0.36.0",
"plugins/node/opentelemetry-instrumentation-winston": "0.36.0",
"plugins/web/opentelemetry-instrumentation-document-load": "0.37.0",
"plugins/web/opentelemetry-instrumentation-long-task": "0.37.0",
"plugins/web/opentelemetry-instrumentation-user-interaction": "0.37.0",
"plugins/web/opentelemetry-plugin-react-load": "0.30.0",
"propagators/opentelemetry-propagator-aws-xray": "1.3.1",
"propagators/opentelemetry-propagator-grpc-census-binary": "0.27.1",
"propagators/opentelemetry-propagator-instana": "0.3.1",
"propagators/opentelemetry-propagator-ot-trace": "0.27.1"
"detectors/node/opentelemetry-resource-detector-alibaba-cloud": "0.28.9",
"detectors/node/opentelemetry-resource-detector-aws": "1.4.2",
"detectors/node/opentelemetry-resource-detector-azure": "0.2.7",
"detectors/node/opentelemetry-resource-detector-container": "0.3.9",
"detectors/node/opentelemetry-resource-detector-gcp": "0.29.9",
"detectors/node/opentelemetry-resource-detector-github": "0.28.2",
"detectors/node/opentelemetry-resource-detector-instana": "0.9.0",
"metapackages/auto-instrumentations-node": "0.46.0",
"metapackages/auto-instrumentations-web": "0.39.0",
"packages/baggage-span-processor": "0.1.0",
"packages/opentelemetry-host-metrics": "0.35.1",
"packages/opentelemetry-id-generator-aws-xray": "1.2.2",
"packages/opentelemetry-propagation-utils": "0.30.9",
"packages/opentelemetry-redis-common": "0.36.2",
"packages/opentelemetry-sql-common": "0.40.1",
"packages/opentelemetry-test-utils": "0.39.0",
"packages/winston-transport": "0.3.0",
"plugins/node/instrumentation-amqplib": "0.37.0",
"plugins/node/instrumentation-cucumber": "0.6.0",
"plugins/node/instrumentation-dataloader": "0.9.0",
"plugins/node/instrumentation-fs": "0.12.0",
"plugins/node/instrumentation-lru-memoizer": "0.37.0",
"plugins/node/instrumentation-mongoose": "0.38.1",
"plugins/node/instrumentation-runtime-node": "0.4.0",
"plugins/node/instrumentation-socket.io": "0.39.0",
"plugins/node/instrumentation-tedious": "0.10.1",
"plugins/node/instrumentation-undici": "0.2.0",
"plugins/node/opentelemetry-instrumentation-aws-lambda": "0.41.0",
"plugins/node/opentelemetry-instrumentation-aws-sdk": "0.41.0",
"plugins/node/opentelemetry-instrumentation-bunyan": "0.38.0",
"plugins/node/opentelemetry-instrumentation-cassandra": "0.38.0",
"plugins/node/opentelemetry-instrumentation-connect": "0.36.0",
"plugins/node/opentelemetry-instrumentation-dns": "0.36.1",
"plugins/node/opentelemetry-instrumentation-express": "0.38.0",
"plugins/node/opentelemetry-instrumentation-fastify": "0.36.1",
"plugins/node/opentelemetry-instrumentation-generic-pool": "0.36.0",
"plugins/node/opentelemetry-instrumentation-graphql": "0.40.0",
"plugins/node/opentelemetry-instrumentation-hapi": "0.38.0",
"plugins/node/opentelemetry-instrumentation-ioredis": "0.40.0",
"plugins/node/opentelemetry-instrumentation-knex": "0.36.1",
"plugins/node/opentelemetry-instrumentation-koa": "0.40.0",
"plugins/node/opentelemetry-instrumentation-memcached": "0.36.0",
"plugins/node/opentelemetry-instrumentation-mongodb": "0.43.0",
"plugins/node/opentelemetry-instrumentation-mysql": "0.38.1",
"plugins/node/opentelemetry-instrumentation-mysql2": "0.38.1",
"plugins/node/opentelemetry-instrumentation-nestjs-core": "0.37.1",
"plugins/node/opentelemetry-instrumentation-net": "0.36.0",
"plugins/node/opentelemetry-instrumentation-pg": "0.41.0",
"plugins/node/opentelemetry-instrumentation-pino": "0.39.0",
"plugins/node/opentelemetry-instrumentation-redis": "0.39.1",
"plugins/node/opentelemetry-instrumentation-redis-4": "0.39.0",
"plugins/node/opentelemetry-instrumentation-restify": "0.38.0",
"plugins/node/opentelemetry-instrumentation-router": "0.37.0",
"plugins/node/opentelemetry-instrumentation-winston": "0.37.0",
"plugins/web/opentelemetry-instrumentation-document-load": "0.38.0",
"plugins/web/opentelemetry-instrumentation-long-task": "0.38.0",
"plugins/web/opentelemetry-instrumentation-user-interaction": "0.38.0",
"plugins/web/opentelemetry-plugin-react-load": "0.30.1",
"propagators/opentelemetry-propagator-grpc-census-binary": "0.27.2",
"propagators/opentelemetry-propagator-instana": "0.3.2",
"propagators/opentelemetry-propagator-ot-trace": "0.27.2"
}
33 changes: 33 additions & 0 deletions GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,36 @@ To support this use case, you can choose one of the following options:
};
...
```

## Diag Logging

The OpenTelemetry diagnostic logging channel can be used to troubleshoot issues with instrumentation packages.

### Patching Messages

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:

- 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.
- 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.

It can also be useful to know when the instrumentation is loaded and patched, to understand the order of operations in the application.

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:
```shell
@opentelemetry/instrumentation-foo Applying instrumentation patch for module on require hook {
module: 'foo',
version: '1.2.3',
baseDir: '<your directory>/node_modules/foo'
}
```
Instrumentation should not add additional debug messages for triggering the patching and unpatching callbacks, as the base class will handle this.
Instrumentation may add additional patch/unpatch messages for specific functions if it is expected to help in troubleshooting issues with the instrumentation. Few examples:
- 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.
- 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`.
- 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.
The cases above are not covered by the base class and offer additional context to the user troubleshooting an issue with the instrumentation.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [2022] OpenTelemetry Authors
Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [2022] OpenTelemetry Authors
Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,20 @@
* devDependencies
* @opentelemetry/contrib-test-utils bumped from ^0.36.0 to ^0.37.0

## [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)


### Bug Fixes

* 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))


### Dependencies

* The following workspace dependencies were updated
* devDependencies
* @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.0

## [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)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [2021] OpenTelemetry Authors
Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentelemetry/resource-detector-alibaba-cloud",
"version": "0.28.8",
"version": "0.28.9",
"description": "OpenTelemetry resource detector for Alibaba Cloud",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
Expand Down Expand Up @@ -40,7 +40,7 @@
},
"devDependencies": {
"@opentelemetry/api": "^1.0.0",
"@opentelemetry/contrib-test-utils": "^0.38.0",
"@opentelemetry/contrib-test-utils": "^0.39.0",
"@types/mocha": "8.2.3",
"@types/node": "18.6.5",
"@types/sinon": "10.0.18",
Expand Down
14 changes: 14 additions & 0 deletions detectors/node/opentelemetry-resource-detector-aws/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,20 @@
* devDependencies
* @opentelemetry/contrib-test-utils bumped from ^0.35.1 to ^0.36.0

## [1.4.2](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-aws-v1.4.1...resource-detector-aws-v1.4.2) (2024-04-25)


### Bug Fixes

* 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))


### Dependencies

* The following workspace dependencies were updated
* devDependencies
* @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.0

## [1.4.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-aws-v1.4.0...resource-detector-aws-v1.4.1) (2024-04-03)


Expand Down
2 changes: 1 addition & 1 deletion detectors/node/opentelemetry-resource-detector-aws/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [2020] OpenTelemetry Authors
Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentelemetry/resource-detector-aws",
"version": "1.4.1",
"version": "1.4.2",
"description": "OpenTelemetry SDK resource detector for AWS",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
Expand Down Expand Up @@ -39,7 +39,7 @@
},
"devDependencies": {
"@opentelemetry/api": "^1.0.0",
"@opentelemetry/contrib-test-utils": "^0.38.0",
"@opentelemetry/contrib-test-utils": "^0.39.0",
"@types/mocha": "8.2.3",
"@types/node": "18.6.5",
"@types/sinon": "10.0.18",
Expand Down
14 changes: 14 additions & 0 deletions detectors/node/opentelemetry-resource-detector-azure/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@
* devDependencies
* @opentelemetry/contrib-test-utils bumped from ^0.36.0 to ^0.37.0

## [0.2.7](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-azure-v0.2.6...resource-detector-azure-v0.2.7) (2024-04-25)


### Bug Fixes

* 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))


### Dependencies

* The following workspace dependencies were updated
* devDependencies
* @opentelemetry/contrib-test-utils bumped from ^0.38.0 to ^0.39.0

## [0.2.6](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-azure-v0.2.5...resource-detector-azure-v0.2.6) (2024-04-03)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work.
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [2020] OpenTelemetry Authors
Copyright [yyyy] [name of copyright owner]

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

0 comments on commit 9ec3c9f

Please sign in to comment.