Skip to content

Commit

Permalink
docs: add resource attributes (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
theletterf authored Oct 1, 2021
1 parent 40f3c60 commit 2df498f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ node -r @splunk/otel/instrument index.js

## Correlate traces and logs

The Splunk Distribution of OpenTelemetry JS can make trace metadata available to many Node.js logging libraries capable of accessing them, like Pino, Winston, and Bunyan. You can use trace metadata to correlate traces with log events, and explore logs in Observability Cloud.
The Splunk Distribution of OpenTelemetry JS automatically injects trace metadata into logs so that Node.js logging libraries can access it. You can use trace metadata to correlate traces with log events and explore logs in Observability Cloud.

For more information, see [Correlating traces with logs](./docs/correlate-logs-traces.md).

Expand Down Expand Up @@ -139,7 +139,7 @@ opentelemetry-instrumentation-sequelize
opentelemetry-instrumentation-typeorm
```

If log injection is enabled, the corresponding logging library package must be installed beforehand. Supported logging library instrumentations:
The following logging library instrumentations are supported:

```
@opentelemetry/instrumentation-bunyan
Expand Down
5 changes: 3 additions & 2 deletions docs/correlate-logs-traces.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ The following logging librares are supported:
- Pino
- Winston

## Available trace data
## Injected trace data

The following attributes are available for applications instrumented using the Splunk distribution of OpenTelemetry JS:
The following attributes are automatically injected into logs:

- Trace information: `trace_id`, `span_id`, and `trace_flags`
- Resource attributes: `service.name`, `service.version`, and `deployment.environment`(as `service.environment`)

The format of each log message depends on the logging library. The following is a sample log message formatted by the Pino library:

Expand Down

0 comments on commit 2df498f

Please sign in to comment.