Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs changes for GA #294

Merged
merged 32 commits into from
Sep 28, 2021
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
16f8c68
First commit
theletterf Sep 9, 2021
e4876fd
Separate config from README
theletterf Sep 15, 2021
10782f9
Fixes
theletterf Sep 15, 2021
6ccb0e3
README improvements
theletterf Sep 20, 2021
8208348
Troubleshooting
theletterf Sep 20, 2021
c8726b7
Changes to Troubleshooting
theletterf Sep 20, 2021
f19d922
Update README.md
theletterf Sep 20, 2021
ee32679
Update README.md
theletterf Sep 20, 2021
5628c70
Update README.md
theletterf Sep 20, 2021
be4b531
Update README.md
theletterf Sep 20, 2021
18d560e
Update README.md
theletterf Sep 20, 2021
7d4c57a
Update plugins.md
theletterf Sep 20, 2021
39eff16
Merge branch 'main' into main
theletterf Sep 20, 2021
dafda12
Merge branch 'signalfx:main' into main
theletterf Sep 20, 2021
16718c7
Changes for GA
theletterf Sep 20, 2021
67eb68b
ToDo for Correlation of Traces and Logs
theletterf Sep 20, 2021
3d81a1e
Remove agent talk
theletterf Sep 21, 2021
555eaaf
Fix link
theletterf Sep 21, 2021
765b4a1
Correlate traces and logs
theletterf Sep 21, 2021
66d3368
Change to CONTRIBUTING (see GDI Specs PR129)
theletterf Sep 21, 2021
c289c37
Add callouts
theletterf Sep 21, 2021
db5e4c4
README inside docs
theletterf Sep 21, 2021
52f58e6
Fix links
theletterf Sep 21, 2021
7aaee68
Remove SPLUNK_LOG_INJECTION
theletterf Sep 22, 2021
037df28
Merge branch 'main' into main
rauno56 Sep 27, 2021
b817b4f
Change default port
theletterf Sep 28, 2021
d1c5468
Merge branch 'main' of github.com:theletterf/splunk-otel-js into main
theletterf Sep 28, 2021
5d48e26
Remove log injections vars from Migrating.md
theletterf Sep 28, 2021
2132728
Revert "Change default port"
theletterf Sep 28, 2021
085f38e
Revert "Remove log injections vars from Migrating.md"
theletterf Sep 28, 2021
48d3d45
Restore old fields
theletterf Sep 28, 2021
dc2a7bd
Merge branch 'main' into main
rauno56 Sep 28, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Tue, 07 Sep 2021 12:05:40 GMT

### Changed

- Context management should not work properly on older versions of NodeJS (<14.8).
- Context management should not work properly on older versions of Node.js (<14.8).
([#53](https://github.com/signalfx/splunk-otel-js/pull/53))


Expand Down
60 changes: 30 additions & 30 deletions MIGRATING.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# Migrate from the SignalFx Tracing Library for NodeJS
# Migrate from the SignalFx Tracing Library for Node.js

The Splunk Distribution of OpenTelemetry for NodeJS replaces the SignalFx Tracing
Library for NodeJS. If you’re using the SignalFx Tracing Library, migrate to
the Splunk Distribution of OpenTelemetry for NodeJS to use OpenTelemetry
instrumentation to send traces to Splunk APM. The Splunk Distribution of
OpenTelemetry for NodeJS uses OpenTelemetry to instrument applications, which is
an open-source API to gather telemetry data, and has a smaller footprint.
The Splunk Distribution of OpenTelemetry for Node.js replaces the SignalFx Tracing
Library for Node.js. If you’re using the SignalFx Tracing Library, migrate to
the Splunk Distribution of OpenTelemetry for Node.js to send traces to Splunk
Observability Cloud. The Splunk Distribution of OpenTelemetry for Node.js uses
OpenTelemetry to instrument applications, which is an open-source API to gather
telemetry data, and has a smaller footprint.

Because the SignalFx Tracing Library for NodeJS uses OpenTracing and the Splunk Distribution of OpenTelemetry for NodeJS
uses OpenTelemetry, the semantic conventions for span names and attributes change when you migrate. For more
information, see
[Migrate from OpenTracing to OpenTelemetry](https://docs.signalfx.com/en/latest/apm/apm-getting-started/apm-opentelemetry-collector.html#apm-opentelemetry-migration).
Because the SignalFx Tracing Library for Node.js uses OpenTracing and the Splunk
Distribution of OpenTelemetry for Node.js uses OpenTelemetry, the semantic
conventions for span names and attributes change when you migrate. For more
information, see [Migrate from OpenTracing to OpenTelemetry](https://docs.signalfx.com/en/latest/apm/apm-getting-started/apm-opentelemetry-collector.html#apm-opentelemetry-migration).

## Getting help

If you experience any issues following the guide below, or something is unclear, or missing, please don't hesitate to
open an issue in Github. Any and all ideas for improvements are also welcome.
If you experience any issues following the guide below, or something is unclear, or missing, don't hesitate to
open an issue in GitHub. Any and all ideas for improvements are also welcome.

<a name="known-limitations"></a>
## Known limitations as compared to SignalFx Tracing Library
Expand All @@ -40,7 +40,7 @@ open an issue in Github. Any and all ideas for improvements are also welcome.

## Requirements

This Splunk Distribution of OpenTelemetry requires Node.js 8.5 or later,
This Splunk Distribution of OpenTelemetry requires Node.js 8.5 or higher,
[see more information here](https://github.com/open-telemetry/opentelemetry-js#node-support)
If you're still using an earlier version of Node.js, continue using the SignalFx Tracing Library for Node.js.

Expand All @@ -51,15 +51,15 @@ Current effective required Node.js version is: ![node-current](https://img.shiel
### Instrumented libraries

With the exception of [explicitly listed limitations](#known-limitations) we aim to support all libraries supported by
signalfx-nodejs-tracing. To find an equivalent auto-instrumentation open <https://opentelemetry.io/registry/> and for
signalfx-nodejs-tracing. To find an equivalent autoinstrumentation open <https://opentelemetry.io/registry/> and for
each instrumentation
[from `signalfx-nodejs-tracing`'s README](https://github.com/signalfx/signalfx-nodejs-tracing/#requirements-and-supported-software)
search by the name of the library in the registry.

For example, if you'd like to migrate instrumentation for `mysql`, go to
[https://opentelemetry.io/registry/?s=**mysql**&component=&language=**js**#](https://opentelemetry.io/registry/?s=mysql&component=&language=js#).

Once you have identified an instrumentation package, **install it** using npm or Yarn.
Once you have identified an instrumentation package, **install it** using npm or yarn.

- If the package is [on this list](./README.md#default-instrumentation-packages-), it
will be enabled automatically (**but it won't be installed automatically**).
Expand All @@ -70,23 +70,23 @@ Once you have identified an instrumentation package, **install it** using npm or

Rename environment variables:

| OpenTracing environment variable | OpenTelemetry environment variable | notes |
| ---------------------------------- | ------------------------------------ | ----- |
| SIGNALFX_ACCESS_TOKEN | SPLUNK_ACCESS_TOKEN | |
| SIGNALFX_SERVICE_NAME | OTEL_SERVICE_NAME | |
| SIGNALFX_ENDPOINT_URL | _no direct equivalent_ | see [the notes on endpoint](#endpoint) |
| SIGNALFX_RECORDED_VALUE_MAX_LENGTH | SPLUNK_MAX_ATTR_LENGTH | currently not implemented. See [#2403](otel-issue-attr-limits) |
| SIGNALFX_TRACING_DEBUG | _no direct equivalent_ | see [instrumentation logs](#instrumentation-logs) |
| SIGNALFX_SPAN_TAGS | OTEL_RESOURCE_ATTRIBUTES | format needs to be changed to `key1=val1,key2=val2` |
| SIGNALFX_LOGS_INJECTION | SPLUNK_LOGS_INJECTION | |
| SIGNALFX_LOGS_INJECTION_TAGS | OTEL_RESOURCE_ATTRIBUTES | there's no direct equivalent, but values specified in `OTEL_RESOURCE_ATTRIBUTES` will also be used for logs injection |
| SIGNALFX_ENABLED_PLUGINS | n/a | see [the README section about instrumentations](./README.md#custom-instrumentation-packages) |
| SIGNALFX_SERVER_TIMING_CONTEXT | SPLUNK_TRACE_RESPONSE_HEADER_ENABLED | |
| SIGNALFX_TRACING_ENABLED | OTEL_TRACE_ENABLED | |
| OpenTracing environment variable | OpenTelemetry environment variable | notes |
| ---------------------------------- | -------------------------------------- | ----- |
| SIGNALFX_ACCESS_TOKEN | SPLUNK_ACCESS_TOKEN | |
| SIGNALFX_SERVICE_NAME | OTEL_SERVICE_NAME | |
| SIGNALFX_ENDPOINT_URL | _no direct equivalent_ | see [the notes on endpoint](#endpoint) |
| SIGNALFX_RECORDED_VALUE_MAX_LENGTH | OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT | |
| SIGNALFX_TRACING_DEBUG | _no direct equivalent_ | see [instrumentation logs](#instrumentation-logs) |
| SIGNALFX_SPAN_TAGS | OTEL_RESOURCE_ATTRIBUTES | format needs to be changed to `key1=val1,key2=val2` |
| SIGNALFX_LOGS_INJECTION | SPLUNK_LOGS_INJECTION | |
| SIGNALFX_LOGS_INJECTION_TAGS | OTEL_RESOURCE_ATTRIBUTES | there's no direct equivalent, but values specified in `OTEL_RESOURCE_ATTRIBUTES` will also be used for logs injection |
| SIGNALFX_ENABLED_PLUGINS | n/a | see [the README section about instrumentations](./README.md#custom-instrumentation-packages) |
| SIGNALFX_SERVER_TIMING_CONTEXT | SPLUNK_TRACE_RESPONSE_HEADER_ENABLED | |
| SIGNALFX_TRACING_ENABLED | OTEL_TRACE_ENABLED | |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rauno56 As discussed, we need the definitive list of settings here.


### Programmatic configuration

Update these programmatic configuration options:
Update these programmatic configuration options (passed as arguments to `startTracing()`):

| OpenTracing property | OpenTelemetry property | Notes |
| ------------------------ | ----------------------- | ----- |
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ If you're currently using the SignalFx Tracing Library for Node and want to
migrate to the Splunk Distribution of OpenTelemetry Node, see [Migrate from
the SignalFx Tracing Library for JS](./MIGRATING.md).

> This project is currently in **BETA**. It is **officially supported** by Splunk. However, breaking changes **MAY** be introduced.

## Get started

The following instructions assume that you're sending data to Splunk Observability Cloud using the [OpenTelemetry Collector](https://docs.splunk.com/Observability/gdi/opentelemetry/opentelemetry.html) running on localhost. If you're running a
Expand Down Expand Up @@ -74,7 +72,7 @@ In order to send traces directly to Splunk Observability Cloud, you need to:
2. Set the `SPLUNK_ACCESS_TOKEN` to your Splunk Observability Cloud [access token](https://docs.splunk.com/Observability/admin/authentication-tokens/api-access-tokens.html).
## Automatically instrument an application

You can use the `-r` CLI flag to preload the instrumentation module and automatically instrument your NodeJS application.
You can use the `-r` CLI flag to preload the instrumentation module and automatically instrument your Node.js application.
For example, if you normally started your application as follows:

```bash
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The following table contain the configuration options supported by this distribu
| OTEL_PROPAGATORS | propagators | `tracecontext,baggage` | Comma-delimited list of propagators to use. Valid keys: `baggage`, `tracecontext`, `b3multi`, `b3`.
| OTEL_SERVICE_NAME | serviceName | `unnamed-node-service` | The service name of this Node service.
| SPLUNK_ACCESS_TOKEN | accessToken | | The optional access token for exporting signal data directly to SignalFx API.
| SPLUNK_MAX_ATTR_LENGTH | maxAttrLength | 1200 | Maximum length of string attribute value in characters. Longer values are truncated.
| OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT | maxAttrLength | 1200 | Maximum length of string attribute value in characters. Longer values are truncated.
| SPLUNK_TRACE_RESPONSE_HEADER_ENABLED | serverTimingEnabled | `true` | Enable injection of `Server-Timing` header to HTTP responses.
| SPLUNK_LOGS_INJECTION | logInjectionEnabled | `false` | Enable injecting of trace ID, span ID and service name to log records. Please note that the corresponding logging library instrumentation needs to be installed.
| OTEL_RESOURCE_ATTRIBUTES | | | Comma-separated list of resource attributes added to every reported span. <details><summary>Example</summary>`key1=val1,key2=val2`</details>
Expand Down