@peopl-health/nexus 2.3.4 → 2.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,8 +4,6 @@ const { PrometheusExporter } = require('@opentelemetry/exporter-prometheus');
4
4
  const { JaegerExporter } = require('@opentelemetry/exporter-jaeger');
5
5
  const { OTLPTraceExporter } = require('@opentelemetry/exporter-trace-otlp-http');
6
6
  const { BatchSpanProcessor } = require('@opentelemetry/sdk-trace-node');
7
- const { Resource } = require('@opentelemetry/resources');
8
- const { SEMRESATTRS_SERVICE_NAME, SEMRESATTRS_SERVICE_VERSION } = require('@opentelemetry/semantic-conventions');
9
7
 
10
8
  class TelemetryManager {
11
9
  constructor() {
@@ -30,11 +28,9 @@ class TelemetryManager {
30
28
  } = config;
31
29
 
32
30
  try {
33
- // Create resource with service information
34
- const resource = new Resource({
35
- [SEMRESATTRS_SERVICE_NAME]: serviceName,
36
- [SEMRESATTRS_SERVICE_VERSION]: serviceVersion,
37
- });
31
+ // Set service information via environment variables (NodeSDK auto-detects these)
32
+ process.env.OTEL_SERVICE_NAME = serviceName;
33
+ process.env.OTEL_SERVICE_VERSION = serviceVersion;
38
34
 
39
35
  const prometheusExporter = new PrometheusExporter({
40
36
  endpoint: prometheusEndpoint,
@@ -67,7 +63,6 @@ class TelemetryManager {
67
63
  });
68
64
 
69
65
  this.sdk = new NodeSDK({
70
- resource: resource,
71
66
  instrumentations: [getNodeAutoInstrumentations({
72
67
  '@opentelemetry/instrumentation-fs': {
73
68
  enabled: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peopl-health/nexus",
3
- "version": "2.3.4",
3
+ "version": "2.3.5",
4
4
  "description": "Core messaging and assistant library for WhatsApp communication platforms",
5
5
  "keywords": [
6
6
  "whatsapp",