Skip to content

Commit

Permalink
Merge pull request #504 from solarwinds/dependabot/npm_and_yarn/otel-…
Browse files Browse the repository at this point in the history
…2187fff6d8

Bump the otel group across 1 directory with 54 updates
  • Loading branch information
raphael-theriault-swi authored Nov 19, 2024
2 parents 47fd847 + e2e4535 commit 458f88f
Show file tree
Hide file tree
Showing 13 changed files with 482 additions and 594 deletions.
11 changes: 11 additions & 0 deletions .yarn/versions/12c16fdd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
releases:
"@solarwinds-apm/histogram": patch
"@solarwinds-apm/instrumentations": minor
"@solarwinds-apm/sampling": patch
"@solarwinds-apm/test": patch
solarwinds-apm: patch

declined:
- "@solarwinds-apm/bindings"
- "@solarwinds-apm/compat"
- "@solarwinds-apm/dependencies"
2 changes: 1 addition & 1 deletion packages/histogram/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
"devDependencies": {
"@opentelemetry/api": "^1.3.0",
"@opentelemetry/sdk-metrics": "~1.27.0",
"@opentelemetry/sdk-metrics": "~1.28.0",
"@solarwinds-apm/eslint-config": "workspace:^",
"@types/node": "^18.19.0",
"eslint": "^9.12.0",
Expand Down
88 changes: 44 additions & 44 deletions packages/instrumentations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,52 +36,52 @@
"test": "swtest -p test/tsconfig.json -c src"
},
"dependencies": {
"@opentelemetry/core": "~1.27.0",
"@opentelemetry/instrumentation": "~0.54.0",
"@opentelemetry/instrumentation-amqplib": "^0.43.0",
"@opentelemetry/instrumentation-aws-lambda": "^0.47.0",
"@opentelemetry/instrumentation-aws-sdk": "^0.46.0",
"@opentelemetry/instrumentation-bunyan": "^0.42.0",
"@opentelemetry/instrumentation-cassandra-driver": "^0.42.0",
"@opentelemetry/instrumentation-connect": "^0.40.0",
"@opentelemetry/instrumentation-cucumber": "^0.10.0",
"@opentelemetry/instrumentation-dataloader": "^0.13.0",
"@opentelemetry/instrumentation-dns": "^0.40.0",
"@opentelemetry/instrumentation-express": "^0.44.0",
"@opentelemetry/instrumentation-fastify": "^0.41.0",
"@opentelemetry/instrumentation-fs": "^0.16.0",
"@opentelemetry/instrumentation-generic-pool": "^0.40.0",
"@opentelemetry/instrumentation-graphql": "^0.44.0",
"@opentelemetry/instrumentation-grpc": "~0.54.0",
"@opentelemetry/instrumentation-hapi": "^0.42.0",
"@opentelemetry/instrumentation-http": "~0.54.0",
"@opentelemetry/instrumentation-ioredis": "^0.44.0",
"@opentelemetry/instrumentation-kafkajs": "^0.4.0",
"@opentelemetry/instrumentation-knex": "^0.41.0",
"@opentelemetry/instrumentation-koa": "^0.44.0",
"@opentelemetry/instrumentation-lru-memoizer": "^0.41.0",
"@opentelemetry/instrumentation-memcached": "^0.40.0",
"@opentelemetry/instrumentation-mongodb": "^0.48.0",
"@opentelemetry/instrumentation-mongoose": "^0.43.0",
"@opentelemetry/instrumentation-mysql": "^0.42.0",
"@opentelemetry/instrumentation-mysql2": "^0.42.0",
"@opentelemetry/instrumentation-nestjs-core": "^0.41.0",
"@opentelemetry/instrumentation-net": "^0.40.0",
"@opentelemetry/instrumentation-pg": "^0.47.0",
"@opentelemetry/instrumentation-pino": "^0.43.0",
"@opentelemetry/instrumentation-redis": "^0.43.0",
"@opentelemetry/instrumentation-redis-4": "^0.43.0",
"@opentelemetry/instrumentation-restify": "^0.42.0",
"@opentelemetry/instrumentation-router": "^0.41.0",
"@opentelemetry/instrumentation-socket.io": "^0.43.0",
"@opentelemetry/instrumentation-tedious": "^0.15.0",
"@opentelemetry/instrumentation-undici": "^0.7.0",
"@opentelemetry/instrumentation-winston": "^0.41.0",
"@opentelemetry/core": "~1.28.0",
"@opentelemetry/instrumentation": "~0.55.0",
"@opentelemetry/instrumentation-amqplib": "^0.44.0",
"@opentelemetry/instrumentation-aws-lambda": "^0.48.0",
"@opentelemetry/instrumentation-aws-sdk": "^0.47.0",
"@opentelemetry/instrumentation-bunyan": "^0.43.0",
"@opentelemetry/instrumentation-cassandra-driver": "^0.43.0",
"@opentelemetry/instrumentation-connect": "^0.41.0",
"@opentelemetry/instrumentation-cucumber": "^0.11.0",
"@opentelemetry/instrumentation-dataloader": "^0.14.0",
"@opentelemetry/instrumentation-dns": "^0.41.0",
"@opentelemetry/instrumentation-express": "^0.45.0",
"@opentelemetry/instrumentation-fastify": "^0.42.0",
"@opentelemetry/instrumentation-fs": "^0.17.0",
"@opentelemetry/instrumentation-generic-pool": "^0.41.0",
"@opentelemetry/instrumentation-graphql": "^0.45.0",
"@opentelemetry/instrumentation-grpc": "~0.55.0",
"@opentelemetry/instrumentation-hapi": "^0.43.0",
"@opentelemetry/instrumentation-http": "~0.55.0",
"@opentelemetry/instrumentation-ioredis": "^0.45.0",
"@opentelemetry/instrumentation-kafkajs": "^0.5.0",
"@opentelemetry/instrumentation-knex": "^0.42.0",
"@opentelemetry/instrumentation-koa": "^0.45.0",
"@opentelemetry/instrumentation-lru-memoizer": "^0.42.0",
"@opentelemetry/instrumentation-memcached": "^0.41.0",
"@opentelemetry/instrumentation-mongodb": "^0.49.0",
"@opentelemetry/instrumentation-mongoose": "^0.44.0",
"@opentelemetry/instrumentation-mysql": "^0.43.0",
"@opentelemetry/instrumentation-mysql2": "^0.43.0",
"@opentelemetry/instrumentation-nestjs-core": "^0.42.0",
"@opentelemetry/instrumentation-net": "^0.41.0",
"@opentelemetry/instrumentation-pg": "^0.48.0",
"@opentelemetry/instrumentation-pino": "^0.44.0",
"@opentelemetry/instrumentation-redis": "^0.44.0",
"@opentelemetry/instrumentation-redis-4": "^0.44.0",
"@opentelemetry/instrumentation-restify": "^0.43.0",
"@opentelemetry/instrumentation-router": "^0.42.0",
"@opentelemetry/instrumentation-socket.io": "^0.44.0",
"@opentelemetry/instrumentation-tedious": "^0.16.0",
"@opentelemetry/instrumentation-undici": "^0.8.0",
"@opentelemetry/instrumentation-winston": "^0.42.0",
"@opentelemetry/resource-detector-aws": "^1.3.1",
"@opentelemetry/resource-detector-azure": "^0.2.4",
"@opentelemetry/resource-detector-azure": "^0.3.0",
"@opentelemetry/resource-detector-container": "^0.5.0",
"@opentelemetry/resources": "~1.27.0",
"@opentelemetry/winston-transport": "^0.7.0",
"@opentelemetry/resources": "~1.28.0",
"@opentelemetry/winston-transport": "^0.8.0",
"@solarwinds-apm/module": "workspace:^"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/sampling/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"test": "swtest -p test/tsconfig.json -c src"
},
"dependencies": {
"@opentelemetry/sdk-trace-base": "~1.27.0"
"@opentelemetry/sdk-trace-base": "~1.28.0"
},
"peerDependencies": {
"@opentelemetry/api": "^1.3.0"
Expand All @@ -48,7 +48,7 @@
},
"devDependencies": {
"@opentelemetry/api": "^1.3.0",
"@opentelemetry/sdk-metrics": "~1.27.0",
"@opentelemetry/sdk-metrics": "~1.28.0",
"@solarwinds-apm/eslint-config": "workspace:^",
"@solarwinds-apm/test": "workspace:^",
"@types/node": "^18.19.0",
Expand Down
22 changes: 11 additions & 11 deletions packages/solarwinds-apm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,17 @@
},
"dependencies": {
"@grpc/grpc-js": "^1.12.2",
"@opentelemetry/api-logs": "~0.54.0",
"@opentelemetry/core": "~1.27.0",
"@opentelemetry/exporter-logs-otlp-proto": "~0.54.0",
"@opentelemetry/exporter-metrics-otlp-proto": "~0.54.0",
"@opentelemetry/exporter-trace-otlp-proto": "~0.54.0",
"@opentelemetry/instrumentation": "~0.54.0",
"@opentelemetry/resources": "~1.27.0",
"@opentelemetry/sdk-logs": "~0.54.0",
"@opentelemetry/sdk-metrics": "~1.27.0",
"@opentelemetry/sdk-trace-base": "~1.27.0",
"@opentelemetry/sdk-trace-node": "~1.27.0",
"@opentelemetry/api-logs": "~0.55.0",
"@opentelemetry/core": "~1.28.0",
"@opentelemetry/exporter-logs-otlp-proto": "~0.55.0",
"@opentelemetry/exporter-metrics-otlp-proto": "~0.55.0",
"@opentelemetry/exporter-trace-otlp-proto": "~0.55.0",
"@opentelemetry/instrumentation": "~0.55.0",
"@opentelemetry/resources": "~1.28.0",
"@opentelemetry/sdk-logs": "~0.55.0",
"@opentelemetry/sdk-metrics": "~1.28.0",
"@opentelemetry/sdk-trace-base": "~1.28.0",
"@opentelemetry/sdk-trace-node": "~1.28.0",
"@opentelemetry/semantic-conventions": "~1.27.0",
"@solarwinds-apm/bindings": "workspace:^",
"@solarwinds-apm/dependencies": "workspace:^",
Expand Down
6 changes: 2 additions & 4 deletions packages/solarwinds-apm/src/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,10 @@ async function initTracing(
SAMPLER.resolve(sampler)

const provider = new NodeTracerProvider({
sampler,
resource,
sampler,
spanProcessors: processors,
})
for (const processor of processors) {
provider.addSpanProcessor(processor)
}
provider.register({ propagator })

logger.debug("initialised tracing")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {

describe("ParentSpanProcessor", () => {
before(async () => {
await otel.reset({ trace: { processors: [new ParentSpanProcessor()] } })
await otel.reset({ trace: { spanProcessors: [new ParentSpanProcessor()] } })
})

it("registers parent span information", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe("ResponseTimeProcessor", () => {
beforeEach(() =>
otel.reset({
trace: {
processors: [
spanProcessors: [
new TransactionNameProcessor({} as Configuration),
new ResponseTimeProcessor(),
new ParentSpanProcessor(),
Expand Down
10 changes: 5 additions & 5 deletions packages/solarwinds-apm/test/processing/transaction-name.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe("TransactionNameProcessor", () => {
it("sets transaction name on entry spans", async () => {
await otel.reset({
trace: {
processors: [
spanProcessors: [
new TransactionNameProcessor({} as Configuration),
new ParentSpanProcessor(),
],
Expand Down Expand Up @@ -70,7 +70,7 @@ describe("TransactionNameProcessor", () => {
it("respects configured transaction name", async () => {
await otel.reset({
trace: {
processors: [
spanProcessors: [
new TransactionNameProcessor({
transactionName: "default",
} as Configuration),
Expand Down Expand Up @@ -104,7 +104,7 @@ describe("TransactionNameProcessor", () => {
it("respects custom transaction name", async () => {
await otel.reset({
trace: {
processors: [
spanProcessors: [
new TransactionNameProcessor({
transactionName: "default",
} as Configuration),
Expand Down Expand Up @@ -141,7 +141,7 @@ describe("TransactionNameProcessor", () => {
it("has a max cardinality of 200 + 1", async () => {
await otel.reset({
trace: {
processors: [
spanProcessors: [
new TransactionNameProcessor({} as Configuration),
new ParentSpanProcessor(),
],
Expand All @@ -166,7 +166,7 @@ describe("TransactionNameProcessor", () => {
it("trims transaction names to 256 characters", async () => {
await otel.reset({
trace: {
processors: [
spanProcessors: [
new TransactionNameProcessor({} as Configuration),
new ParentSpanProcessor(),
],
Expand Down
6 changes: 3 additions & 3 deletions packages/test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
},
"devDependencies": {
"@opentelemetry/api": "^1.3.0",
"@opentelemetry/sdk-metrics": "~1.27.0",
"@opentelemetry/sdk-trace-base": "~1.27.0",
"@opentelemetry/sdk-trace-node": "~1.27.0",
"@opentelemetry/sdk-metrics": "~1.28.0",
"@opentelemetry/sdk-trace-base": "~1.28.0",
"@opentelemetry/sdk-trace-node": "~1.28.0",
"@solarwinds-apm/eslint-config": "workspace:^",
"@types/semver": "^7.5.8",
"eslint": "^9.12.0",
Expand Down
11 changes: 2 additions & 9 deletions packages/test/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import {
InMemorySpanExporter,
type SDKRegistrationConfig,
SimpleSpanProcessor,
type SpanProcessor,
} from "@opentelemetry/sdk-trace-base"
import {
type NodeTracerConfig,
Expand Down Expand Up @@ -110,8 +109,7 @@ let meterProvider: MeterProvider
let shouldResetMetrics = true

export interface OtelConfig {
trace?: NodeTracerConfig &
SDKRegistrationConfig & { processors?: SpanProcessor[] }
trace?: NodeTracerConfig & SDKRegistrationConfig
metrics?: MeterProviderOptions
}

Expand All @@ -125,14 +123,9 @@ async function resetOtel(config: OtelConfig = {}) {

spanExporter = new InMemorySpanExporter()
spanProcessor = new SimpleSpanProcessor(spanExporter)
;((config.trace ??= {}).spanProcessors ??= []).push(spanProcessor)

tracerProvider = new NodeTracerProvider(config.trace)
for (const processor of [
...(config.trace?.processors ?? []),
spanProcessor,
]) {
tracerProvider.addSpanProcessor(processor)
}
tracerProvider.register(config.trace)
} else {
await spanProcessor.forceFlush()
Expand Down
2 changes: 2 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
],
"outputs": [
"dist/**",
".next/**",
".prisma/**",
"npm/*/*.node",
"npm/*/liboboe.so",
"COMPATIBILITY.md"
Expand Down
Loading

0 comments on commit 458f88f

Please sign in to comment.