@lad-tech/nsc-toolkit 1.17.4 → 1.17.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.
- package/CHANGELOG.md +2 -2
- package/dist/Service.js +9 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
## [1.17.
|
|
1
|
+
## [1.17.5](https://github.com/lad-tech/nsc-toolkit/compare/v1.17.4...v1.17.5) (2023-12-20)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* Change opentracing protocol ([#94](https://github.com/lad-tech/nsc-toolkit/issues/94)) ([4798767](https://github.com/lad-tech/nsc-toolkit/commit/4798767037a7aa7f91f3e99113cf2051d062c164))
|
package/dist/Service.js
CHANGED
|
@@ -58,9 +58,15 @@ class Service extends Root_1.Root {
|
|
|
58
58
|
[semantic_conventions_1.SemanticResourceAttributes.SERVICE_NAME]: this.options.name,
|
|
59
59
|
}),
|
|
60
60
|
});
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
let host;
|
|
62
|
+
let port;
|
|
63
|
+
const agentUrl = this.getSettingFromEnv('OTEL_AGENT', false);
|
|
64
|
+
if (agentUrl) {
|
|
65
|
+
const agent = agentUrl.split(':');
|
|
66
|
+
host = agent[0];
|
|
67
|
+
port = parseInt(agent[1]) || undefined;
|
|
68
|
+
}
|
|
69
|
+
const exporter = new exporter_jaeger_1.JaegerExporter({ host, port });
|
|
64
70
|
provider.addSpanProcessor(new sdk_trace_base_1.SimpleSpanProcessor(exporter));
|
|
65
71
|
provider.register();
|
|
66
72
|
}
|