@saidsef/tracing-node 4.1.0 → 4.1.1
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 +15 -26
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,38 +31,27 @@ Effortlessly supercharge your applications with world-class distributed tracing!
|
|
|
31
31
|
- ...
|
|
32
32
|
- Profit?
|
|
33
33
|
|
|
34
|
-
##
|
|
34
|
+
## Where the traces go
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
`setupTracing` exports OTLP over gRPC, so any OpenTelemetry-compatible collector or backend will take it - point `url` at yours.
|
|
37
|
+
|
|
38
|
+
If you do not have one yet, [grafana-loki-on-k8s](https://github.com/saidsef/grafana-loki-on-k8s) is a companion project that deploys the full LGTM+ stack - Grafana, Prometheus, Mimir, Loki, Tempo, Pyroscope, Alloy and Beyla - to Kubernetes with `kubectl apply -k ./deployment`, broken into small composable manifests rather than a single opaque chart. Send traces to its Alloy OTLP receiver and they land in Tempo, with the metrics-generator turning them into RED and service-graph metrics in Mimir:
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
```javascript
|
|
41
|
+
setupTracing({serviceName: 'my-service', url: 'http://alloy:4317'});
|
|
42
|
+
```
|
|
41
43
|
|
|
42
|
-
|
|
44
|
+
The W3C Trace Context propagation this library registers is what lets Tempo pair a caller's client span with the callee's server span, which is what a service graph is built from.
|
|
43
45
|
|
|
44
|
-
|
|
46
|
+
## Instalation
|
|
45
47
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
| `http.status_code` | `http.response.status_code` | HTTP, AWS SDK |
|
|
50
|
-
| `http.url` | `url.full` | HTTP |
|
|
51
|
-
| `http.target` | `url.path` + `url.query` | HTTP |
|
|
52
|
-
| `http.scheme` | `url.scheme` | HTTP |
|
|
53
|
-
| `http.user_agent` | `user_agent.original` | HTTP |
|
|
54
|
-
| `http.client_ip` | `client.address` | HTTP |
|
|
55
|
-
| `http.flavor` | `network.protocol.version` | HTTP |
|
|
56
|
-
| `net.peer.name` | `server.address` | HTTP, IORedis |
|
|
57
|
-
| `net.peer.port` | `server.port` | HTTP, IORedis |
|
|
58
|
-
| `db.system` | `db.system.name` | IORedis, DynamoDB |
|
|
59
|
-
| `db.statement` | `db.query.text` | IORedis, DynamoDB |
|
|
60
|
-
| `db.operation` | `db.operation.name` | IORedis, DynamoDB |
|
|
61
|
-
| `db.connection_string` | none | IORedis |
|
|
48
|
+
```
|
|
49
|
+
npm install @saidsef/tracing-node --save
|
|
50
|
+
```
|
|
62
51
|
|
|
63
|
-
|
|
52
|
+
## Upgrading
|
|
64
53
|
|
|
65
|
-
|
|
54
|
+
Breaking changes and the attribute renames they bring are recorded in the [release notes](https://github.com/saidsef/tracing-node/releases) for the version concerned.
|
|
66
55
|
|
|
67
56
|
## Usage
|
|
68
57
|
|
|
@@ -93,7 +82,7 @@ setupTracing({hostname: 'hostname', serviceName: 'service_name', url: 'endpoint'
|
|
|
93
82
|
|
|
94
83
|
## Source
|
|
95
84
|
|
|
96
|
-
Our latest and greatest source of `tracing-node` can be found on [GitHub](https://github.com/saidsef/tracing-
|
|
85
|
+
Our latest and greatest source of `tracing-node` can be found on [GitHub](https://github.com/saidsef/tracing-node/fork). Fork us!
|
|
97
86
|
|
|
98
87
|
## Contributing
|
|
99
88
|
|