Skip to content

Commit

Permalink
Merge branch 'main' into tm-fix-aws-sdk-v3-middleware-stack-break
Browse files Browse the repository at this point in the history
  • Loading branch information
trentm committed Jan 31, 2024
2 parents 0fcca66 + 84e1a6b commit b66545e
Show file tree
Hide file tree
Showing 118 changed files with 6,581 additions and 3,066 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,11 @@ jobs:
run: |
npm ci
- uses: google-github-actions/release-please-action@v3
- uses: google-github-actions/release-please-action@v4
id: release
with:
command: manifest
token: ${{secrets.RELEASE_PR_TOKEN}}
default-branch: main
target-branch: main

# get release PR as we're currently on main
- name: Checkout release PR
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"detectors/node/opentelemetry-resource-detector-alibaba-cloud":"0.28.5","detectors/node/opentelemetry-resource-detector-aws":"1.3.5","detectors/node/opentelemetry-resource-detector-azure":"0.2.3","detectors/node/opentelemetry-resource-detector-container":"0.3.5","detectors/node/opentelemetry-resource-detector-gcp":"0.29.5","detectors/node/opentelemetry-resource-detector-github":"0.28.1","detectors/node/opentelemetry-resource-detector-instana":"0.5.5","metapackages/auto-instrumentations-node":"0.40.3","metapackages/auto-instrumentations-web":"0.35.0","packages/opentelemetry-host-metrics":"0.34.1","packages/opentelemetry-id-generator-aws-xray":"1.2.1","packages/opentelemetry-propagation-utils":"0.30.5","packages/opentelemetry-redis-common":"0.36.1","packages/opentelemetry-sql-common":"0.40.0","packages/opentelemetry-test-utils":"0.35.1","plugins/node/instrumentation-amqplib":"0.33.5","plugins/node/instrumentation-cucumber":"0.2.1","plugins/node/instrumentation-dataloader":"0.5.4","plugins/node/instrumentation-fs":"0.8.4","plugins/node/instrumentation-lru-memoizer":"0.33.5","plugins/node/instrumentation-mongoose":"0.34.0","plugins/node/instrumentation-socket.io":"0.35.0","plugins/node/instrumentation-tedious":"0.6.5","plugins/node/opentelemetry-instrumentation-aws-lambda":"0.37.4","plugins/node/opentelemetry-instrumentation-aws-sdk":"0.37.2","plugins/node/opentelemetry-instrumentation-bunyan":"0.34.1","plugins/node/opentelemetry-instrumentation-cassandra":"0.34.2","plugins/node/opentelemetry-instrumentation-connect":"0.32.4","plugins/node/opentelemetry-instrumentation-dns":"0.32.5","plugins/node/opentelemetry-instrumentation-express":"0.34.1","plugins/node/opentelemetry-instrumentation-fastify":"0.32.6","plugins/node/opentelemetry-instrumentation-generic-pool":"0.32.5","plugins/node/opentelemetry-instrumentation-graphql":"0.36.1","plugins/node/opentelemetry-instrumentation-hapi":"0.33.3","plugins/node/opentelemetry-instrumentation-ioredis":"0.36.1","plugins/node/opentelemetry-instrumentation-knex":"0.32.4","plugins/node/opentelemetry-instrumentation-koa":"0.36.4","plugins/node/opentelemetry-instrumentation-memcached":"0.32.5","plugins/node/opentelemetry-instrumentation-mongodb":"0.38.1","plugins/node/opentelemetry-instrumentation-mysql":"0.34.5","plugins/node/opentelemetry-instrumentation-mysql2":"0.34.5","plugins/node/opentelemetry-instrumentation-nestjs-core":"0.33.4","plugins/node/opentelemetry-instrumentation-net":"0.32.5","plugins/node/opentelemetry-instrumentation-pg":"0.37.2","plugins/node/opentelemetry-instrumentation-pino":"0.34.5","plugins/node/opentelemetry-instrumentation-redis":"0.35.5","plugins/node/opentelemetry-instrumentation-redis-4":"0.35.6","plugins/node/opentelemetry-instrumentation-restify":"0.34.3","plugins/node/opentelemetry-instrumentation-router":"0.33.4","plugins/node/opentelemetry-instrumentation-winston":"0.33.1","plugins/web/opentelemetry-instrumentation-document-load":"0.34.1","plugins/web/opentelemetry-instrumentation-long-task":"0.34.1","plugins/web/opentelemetry-instrumentation-user-interaction":"0.34.1","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.6","detectors/node/opentelemetry-resource-detector-aws":"1.3.6","detectors/node/opentelemetry-resource-detector-azure":"0.2.4","detectors/node/opentelemetry-resource-detector-container":"0.3.6","detectors/node/opentelemetry-resource-detector-gcp":"0.29.6","detectors/node/opentelemetry-resource-detector-github":"0.28.1","detectors/node/opentelemetry-resource-detector-instana":"0.6.0","metapackages/auto-instrumentations-node":"0.41.0","metapackages/auto-instrumentations-web":"0.36.0","packages/opentelemetry-host-metrics":"0.35.0","packages/opentelemetry-id-generator-aws-xray":"1.2.1","packages/opentelemetry-propagation-utils":"0.30.6","packages/opentelemetry-redis-common":"0.36.1","packages/opentelemetry-sql-common":"0.40.0","packages/opentelemetry-test-utils":"0.36.0","plugins/node/instrumentation-amqplib":"0.34.0","plugins/node/instrumentation-cucumber":"0.3.0","plugins/node/instrumentation-dataloader":"0.6.0","plugins/node/instrumentation-fs":"0.9.0","plugins/node/instrumentation-lru-memoizer":"0.34.0","plugins/node/instrumentation-mongoose":"0.35.0","plugins/node/instrumentation-socket.io":"0.36.0","plugins/node/instrumentation-tedious":"0.7.0","plugins/node/opentelemetry-instrumentation-aws-lambda":"0.38.0","plugins/node/opentelemetry-instrumentation-aws-sdk":"0.38.0","plugins/node/opentelemetry-instrumentation-bunyan":"0.35.0","plugins/node/opentelemetry-instrumentation-cassandra":"0.35.0","plugins/node/opentelemetry-instrumentation-connect":"0.33.0","plugins/node/opentelemetry-instrumentation-dns":"0.33.0","plugins/node/opentelemetry-instrumentation-express":"0.35.0","plugins/node/opentelemetry-instrumentation-fastify":"0.33.0","plugins/node/opentelemetry-instrumentation-generic-pool":"0.33.0","plugins/node/opentelemetry-instrumentation-graphql":"0.37.0","plugins/node/opentelemetry-instrumentation-hapi":"0.34.0","plugins/node/opentelemetry-instrumentation-ioredis":"0.37.0","plugins/node/opentelemetry-instrumentation-knex":"0.33.0","plugins/node/opentelemetry-instrumentation-koa":"0.37.0","plugins/node/opentelemetry-instrumentation-memcached":"0.33.0","plugins/node/opentelemetry-instrumentation-mongodb":"0.39.0","plugins/node/opentelemetry-instrumentation-mysql":"0.35.0","plugins/node/opentelemetry-instrumentation-mysql2":"0.35.0","plugins/node/opentelemetry-instrumentation-nestjs-core":"0.34.0","plugins/node/opentelemetry-instrumentation-net":"0.33.0","plugins/node/opentelemetry-instrumentation-pg":"0.38.0","plugins/node/opentelemetry-instrumentation-pino":"0.35.0","plugins/node/opentelemetry-instrumentation-redis":"0.36.0","plugins/node/opentelemetry-instrumentation-redis-4":"0.36.0","plugins/node/opentelemetry-instrumentation-restify":"0.35.0","plugins/node/opentelemetry-instrumentation-router":"0.34.0","plugins/node/opentelemetry-instrumentation-winston":"0.34.0","plugins/web/opentelemetry-instrumentation-document-load":"0.35.0","plugins/web/opentelemetry-instrumentation-long-task":"0.35.0","plugins/web/opentelemetry-instrumentation-user-interaction":"0.35.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"}
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@
* devDependencies
* @opentelemetry/contrib-test-utils bumped from ^0.35.0 to ^0.35.1

### Dependencies

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

## [0.28.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-alibaba-cloud-v0.28.0...resource-detector-alibaba-cloud-v0.28.1) (2023-08-14)


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.5",
"version": "0.28.6",
"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.35.1",
"@opentelemetry/contrib-test-utils": "^0.36.0",
"@types/mocha": "8.2.3",
"@types/node": "18.6.5",
"@types/sinon": "10.0.18",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@
* devDependencies
* @opentelemetry/contrib-test-utils bumped from ^0.35.0 to ^0.35.1

### Dependencies

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

## [1.3.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-aws-v1.3.0...resource-detector-aws-v1.3.1) (2023-08-14)


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentelemetry/resource-detector-aws",
"version": "1.3.5",
"version": "1.3.6",
"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.35.1",
"@opentelemetry/contrib-test-utils": "^0.36.0",
"@types/mocha": "8.2.3",
"@types/node": "18.6.5",
"@types/sinon": "10.0.18",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

### Dependencies

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

## [0.2.3](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-azure-v0.2.2...resource-detector-azure-v0.2.3) (2024-01-04)


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentelemetry/resource-detector-azure",
"version": "0.2.3",
"version": "0.2.4",
"description": "OpenTelemetry SDK resource detector for Azure",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
Expand Down Expand Up @@ -32,7 +32,7 @@
},
"devDependencies": {
"@opentelemetry/api": "^1.0.0",
"@opentelemetry/contrib-test-utils": "^0.35.1",
"@opentelemetry/contrib-test-utils": "^0.36.0",
"@types/mocha": "8.2.3",
"@types/node": "18.6.5",
"@types/sinon": "10.0.18",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@
* devDependencies
* @opentelemetry/contrib-test-utils bumped from ^0.35.0 to ^0.35.1

### Dependencies

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

## [0.3.2](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-container-v0.3.1...resource-detector-container-v0.3.2) (2023-10-10)


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentelemetry/resource-detector-container",
"version": "0.3.5",
"version": "0.3.6",
"description": "Opentelemetry resource detector to get container resource attributes",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
Expand Down Expand Up @@ -34,7 +34,7 @@
},
"devDependencies": {
"@opentelemetry/api": "^1.0.0",
"@opentelemetry/contrib-test-utils": "^0.35.1",
"@opentelemetry/contrib-test-utils": "^0.36.0",
"@types/mocha": "8.2.3",
"@types/node": "18.6.5",
"@types/sinon": "10.0.18",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@
* devDependencies
* @opentelemetry/contrib-test-utils bumped from ^0.35.0 to ^0.35.1

### Dependencies

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

## [0.29.3](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-gcp-v0.29.2...resource-detector-gcp-v0.29.3) (2023-11-13)


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentelemetry/resource-detector-gcp",
"version": "0.29.5",
"version": "0.29.6",
"description": "OpenTelemetry SDK resource detector for GCP",
"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.35.1",
"@opentelemetry/contrib-test-utils": "^0.36.0",
"@types/mocha": "8.2.3",
"@types/node": "18.6.5",
"@types/semver": "7.5.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@
* devDependencies
* @opentelemetry/contrib-test-utils bumped from ^0.34.3 to ^0.35.0

## [0.6.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-instana-v0.5.5...resource-detector-instana-v0.6.0) (2024-01-29)


### Features

* **deps:** update otel-js to 1.21.0/0.48.0 ([9624486](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/96244869d0fe22e6006fa6ef5e54839e06afb99d))


### Dependencies

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

## [0.5.5](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/resource-detector-instana-v0.5.4...resource-detector-instana-v0.5.5) (2024-01-04)


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentelemetry/resource-detector-instana",
"version": "0.5.5",
"version": "0.6.0",
"description": "OpenTelemetry SDK resource detector for Instana",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
Expand Down Expand Up @@ -38,8 +38,8 @@
},
"devDependencies": {
"@opentelemetry/api": "^1.3.0",
"@opentelemetry/contrib-test-utils": "^0.35.1",
"@opentelemetry/sdk-node": "^0.46.0",
"@opentelemetry/contrib-test-utils": "^0.36.0",
"@opentelemetry/sdk-node": "^0.48.0",
"@types/mocha": "8.2.3",
"@types/node": "18.6.5",
"@types/semver": "7.5.3",
Expand Down
17 changes: 5 additions & 12 deletions examples/fastify/client.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,31 @@
'use strict';

// eslint-disable-next-line import/order
const tracing = require('./tracing')('example-fastify-client');

const { tracer } = tracing;
const api = require('@opentelemetry/api');
const axios = require('axios').default;

const tracer = api.trace.getTracer('fastify-client');

function makeRequest() {
tracing.log('starting');
console.log('starting');
const span = tracer.startSpan('client.makeRequest()', {
kind: api.SpanKind.CLIENT,
});

api.context.with(api.trace.setSpan(api.ROOT_CONTEXT, span), async () => {
try {
const res = await axios.post('http://localhost:8080/run_test/1', {
// testing
// const res = await axios.post('http://localhost:8080/run_test2/1', {
headers: {
'Content-Type': 'application/json',
},
timeout: 3000,
});
tracing.log('status:', res.statusText);
console.log('status:', res.statusText);
span.setStatus({ code: api.SpanStatusCode.OK });
} catch (e) {
tracing.log('failed:', e.message);
console.log('failed:', e.message);
span.setStatus({ code: api.SpanStatusCode.ERROR, message: e.message });
}
span.end();
tracing.log('forcing spans to be exported');
await tracing.provider.shutdown();
tracing.log('all spans exported successfully.');
});
}

Expand Down
34 changes: 23 additions & 11 deletions examples/fastify/docker/collector-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,38 @@ receivers:
protocols:
grpc:
http:
cors_allowed_origins:
- http://*
- https://*
cors:
allowed_origins:
- http://*
- https://*

exporters:
zipkin:
endpoint: "http://zipkin-all-in-one:9411/api/v2/spans"
otlp:
endpoint: "jaeger:4317"
tls:
insecure: true
prometheus:
endpoint: "0.0.0.0:9464"
zipkin:
endpoint: "http://zipkin:9411/api/v2/spans"

processors:
batch:

service:
pipelines:
traces:
receivers: [otlp]
exporters: [zipkin]
processors: [batch]
receivers:
- otlp
exporters:
- otlp
- zipkin
processors:
- batch
metrics:
receivers: [otlp]
exporters: [prometheus]
processors: [batch]
receivers:
- otlp
exporters:
- prometheus
processors:
- batch
34 changes: 22 additions & 12 deletions examples/fastify/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
version: "3"
services:
# Collector
collector:
image: otel/opentelemetry-collector:0.38.0
# image: otel/opentelemetry-collector:latest
command: ["--config=/conf/collector-config.yaml", "--log-level=DEBUG"]
image: otel/opentelemetry-collector:0.92.0
command: ["--config=/conf/collector-config.yaml"]
volumes:
- ./collector-config.yaml:/conf/collector-config.yaml
ports:
- "9464:9464"
- "4317:4317"
- "4318:4318"
- "4317:4317" # OTLP-grpc compatible endpoint (used by client/server)
- "4318:4318" # OTLP-http compatible endpoint (unused in this example)
depends_on:
- zipkin-all-in-one
- jaeger
- zipkin

# Zipkin
zipkin-all-in-one:
image: openzipkin/zipkin:latest
jaeger:
image: jaegertracing/all-in-one:1.52
ports:
- "9411:9411"
- "16686:16686" # frontend (to inspect traces)

zipkin:
image: openzipkin/zipkin:3
ports:
- "9411:9411" # frontend (to inspect traces)

prometheus:
container_name: prometheus
image: prom/prometheus:v2.49.0
volumes:
- ./prometheus.yaml:/etc/prometheus/prometheus.yml
ports:
- "9090:9090"
9 changes: 9 additions & 0 deletions examples/fastify/docker/prometheus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
global:
scrape_interval: 15s # Default is every 1 minute.

scrape_configs:
- job_name: 'collector'
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: ['collector:9464']
Binary file modified examples/fastify/images/trace1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions examples/fastify/opentelemetry.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
'use strict';

const {
diag,
DiagConsoleLogger,
DiagLogLevel,
} = require('@opentelemetry/api');

diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.WARN);

const { HttpInstrumentation } = require('@opentelemetry/instrumentation-http');
const { FastifyInstrumentation } = require('@opentelemetry/instrumentation-fastify');

const { OTLPTraceExporter } = require('@opentelemetry/exporter-trace-otlp-proto');
const { OTLPMetricExporter } = require('@opentelemetry/exporter-metrics-otlp-proto');
const { NodeSDK, metrics } = require('@opentelemetry/sdk-node');

const sdk = new NodeSDK({
instrumentations: [
HttpInstrumentation,
new FastifyInstrumentation(),
],
traceExporter: new OTLPTraceExporter(),
metricReader: new metrics.PeriodicExportingMetricReader({
exporter: new OTLPMetricExporter(),
}),
});

process.on('beforeExit', async () => {
await sdk.shutdown();
});

sdk.start();
Loading

0 comments on commit b66545e

Please sign in to comment.