Skip to content

Commit

Permalink
moves from @opentelemetry/exporter-trace-otlp-http -> `@opentelemet…
Browse files Browse the repository at this point in the history
…ry/exporter-trace-otlp-proto` for protobuf support; our existing infrastructure uses VictoriaMetrics, which only supports protobuf encoding, whereas `@opentelemetry/exporter-trace-otlp-http` seems to only support json encoding
  • Loading branch information
quinndiggitypolymath committed Jan 26, 2024
1 parent d1e1ebc commit ccda4f4
Show file tree
Hide file tree
Showing 3 changed files with 4,291 additions and 3,244 deletions.
4 changes: 2 additions & 2 deletions apps/cdd-backend/src/config/telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import os from 'node:os';
import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node';
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http';
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-proto';
import { Resource } from '@opentelemetry/resources';
import { NodeSDK } from '@opentelemetry/sdk-node';
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
Expand All @@ -26,7 +26,7 @@ const telemetryEnvConfig = (): TelemetryConfig | undefined => {
hostname: process.env.OTLP_HOSTNAME,
service: process.env.OTLP_SERVICE,
};


if (rawConfig.url) {
return telemetryZ.parse(rawConfig);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"@nestjs/swagger": "^6.2.1",
"@opentelemetry/api": "^1.4.0",
"@opentelemetry/auto-instrumentations-node": "^0.36.4",
"@opentelemetry/exporter-trace-otlp-http": "^0.35.1",
"@opentelemetry/exporter-trace-otlp-proto": "^0.47.0",
"@opentelemetry/resources": "^1.9.1",
"@opentelemetry/sdk-node": "^0.35.1",
"@opentelemetry/semantic-conventions": "^1.9.1",
Expand Down
Loading

0 comments on commit ccda4f4

Please sign in to comment.