@saidsef/tracing-node 3.3.4 → 3.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.
@@ -34,4 +34,4 @@ spec:
34
34
  gitRepo:
35
35
  directory: "."
36
36
  repository: "https://github.com/saidsef/tracing-node.git"
37
- revision: "fastapi-import"
37
+ revision: "service-name"
package/libs/index.mjs CHANGED
@@ -32,7 +32,6 @@ import {PinoInstrumentation} from '@opentelemetry/instrumentation-pino';
32
32
  import {IORedisInstrumentation} from '@opentelemetry/instrumentation-ioredis';
33
33
  import {registerInstrumentations} from '@opentelemetry/instrumentation';
34
34
  import {defaultServiceName} from '@opentelemetry/resources';
35
- import {SemanticResourceAttributes} from '@opentelemetry/semantic-conventions';
36
35
 
37
36
  diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.INFO);
38
37
 
@@ -59,12 +58,7 @@ let tracerProvider = null; // Declare provider in module scope for access in sto
59
58
 
60
59
  export function setupTracing(options = {}) {
61
60
  const {
62
- containerName = process.env.CONTAINER_NAME,
63
- deploymentEnvironment = process.env.NODE_ENV,
64
- hostname = process.env.HOSTNAME,
65
61
  serviceName = process.env.SERVICE_NAME,
66
- serviceNameSpace = process.env.NAME_SPACE || 'default',
67
- serviceVersion = process.env.SERVICE_VERSION || '0.0.0',
68
62
  url = process.env.ENDPOINT,
69
63
  concurrencyLimit = 10,
70
64
  } = options;
@@ -82,16 +76,7 @@ export function setupTracing(options = {}) {
82
76
 
83
77
  tracerProvider = new NodeTracerProvider({
84
78
  spanProcessors: [spanProcessor],
85
- resource: new defaultServiceName({
86
- [SemanticResourceAttributes.CONTAINER_NAME]: containerName || serviceName,
87
- [SemanticResourceAttributes.DEPLOYMENT_ENVIRONMENT]: deploymentEnvironment,
88
- [SemanticResourceAttributes.HOSTNAME]: hostname,
89
- [SemanticResourceAttributes.SERVICE_NAME]: serviceName,
90
- [SemanticResourceAttributes.SERVICE_NAMESPACE]: serviceNameSpace,
91
- [SemanticResourceAttributes.SERVICE_VERSION]: serviceVersion || '0.0.0',
92
- [SemanticResourceAttributes.URL]: url,
93
- instrumentationLibrarySemanticConvention: true,
94
- }),
79
+ resource: new defaultServiceName(),
95
80
  });
96
81
 
97
82
  // Initialize the tracer provider with propagators
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saidsef/tracing-node",
3
- "version": "3.3.4",
3
+ "version": "3.3.5",
4
4
  "description": "tracing NodeJS - Wrapper for OpenTelemetry instrumentation packages",
5
5
  "main": "libs/index.mjs",
6
6
  "scripts": {