@saidsef/tracing-node 1.9.6 → 1.9.8
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/README.md +2 -2
- package/libs/index.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,12 +23,12 @@ npm install @saidsef/tracing-node --save
|
|
|
23
23
|
## Usage
|
|
24
24
|
|
|
25
25
|
```
|
|
26
|
-
const
|
|
26
|
+
const setupTracing = require('@saidsef/tracing-node');
|
|
27
27
|
setupTracing('hostname', 'application_name', 'endpoint');
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
```
|
|
31
|
-
import
|
|
31
|
+
import setupTracing from '@saidsef/tracing-node';
|
|
32
32
|
setupTracing('hostname', 'application_name', 'endpoint');
|
|
33
33
|
```
|
|
34
34
|
|
package/libs/index.mjs
CHANGED
|
@@ -55,7 +55,7 @@ diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.INFO);
|
|
|
55
55
|
* be used to create and export spans for tracing various operations within
|
|
56
56
|
* the service.
|
|
57
57
|
*/
|
|
58
|
-
export
|
|
58
|
+
export default function setupTracing (serviceName, appName="application", endpoint=null) {
|
|
59
59
|
const provider = new NodeTracerProvider({
|
|
60
60
|
resource: new Resource({
|
|
61
61
|
[SemanticResourceAttributes.SERVICE_NAME]: serviceName,
|