@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.
Files changed (2) hide show
  1. package/README.md +15 -26
  2. 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
- ## Instalation
34
+ ## Where the traces go
35
35
 
36
- ```
37
- npm install @saidsef/tracing-node --save
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
- ## Upgrading to 4.0.0
40
+ ```javascript
41
+ setupTracing({serviceName: 'my-service', url: 'http://alloy:4317'});
42
+ ```
41
43
 
42
- **Breaking change: spans now carry the stable OpenTelemetry semantic conventions.**
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
- The upstream instrumentations ([open-telemetry/opentelemetry-js-contrib#3585](https://github.com/open-telemetry/opentelemetry-js-contrib/pull/3585)) dropped the legacy attributes and removed the `OTEL_SEMCONV_STABILITY_OPT_IN` escape hatch, so there is no way to keep the old names. The public API of `setupTracing` / `stopTracing` is unchanged - no code changes are required - but any dashboard, alert or processor keyed on the old attribute names must be updated.
46
+ ## Instalation
45
47
 
46
- | Removed | Replacement | Affected spans |
47
- |---------|-------------|----------------|
48
- | `http.method` | `http.request.method` | HTTP |
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
- Server-side HTTP metrics also move from `http.server.duration` (milliseconds) to `http.server.request.duration` (seconds), and the client equivalents likewise.
52
+ ## Upgrading
64
53
 
65
- `peer.service` is unchanged, so Tempo/Grafana service graphs keep working as before. IORedis spans also gain `db.operation.name`, which distinguishes `MULTI`/`PIPELINE` commands.
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-nodec/fork). Fork us!
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saidsef/tracing-node",
3
- "version": "4.1.0",
3
+ "version": "4.1.1",
4
4
  "description": "tracing NodeJS - Wrapper for OpenTelemetry instrumentation packages",
5
5
  "main": "libs/index.mjs",
6
6
  "scripts": {