Skip to content

Commit

Permalink
Merge branch 'main' into v3
Browse files Browse the repository at this point in the history
  • Loading branch information
mhennoch committed Sep 16, 2024
2 parents 5ae3e80 + 59bf484 commit 40f50d1
Show file tree
Hide file tree
Showing 28 changed files with 1,203 additions and 1,565 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Change Log - @splunk/otel

## 2.12.0

- Add `resourceFactory` option for traces. Allows for customization of the detected resource. Previously a resource could be provided via `tracerConfig`, but this overwrote the detected attributes. For backwards compatibility the latter option is still possible. [#938](https://github.com/signalfx/splunk-otel-js/pull/938)
- Support `none` value for `OTEL_TRACES_EXPORTER` and `OTEL_METRICS_EXPORTER` environment variables. [#939](https://github.com/signalfx/splunk-otel-js/pull/939)
- Use the default `OTEL_BSP_SCHEDULE_DELAY` of `5000` instead of `500`. This was a workaround for an old `BatchSpanProcessor` bug where it failed to flush spans fully. [#940](https://github.com/signalfx/splunk-otel-js/pull/940)
- Disable log sending for Winston instrumentation by default. Add `winston-transport` package as a dependency in case log collection is enabled. [#941](https://github.com/signalfx/splunk-otel-js/pull/941)
- Use a synchronous container detector from upstream. [#944](https://github.com/signalfx/splunk-otel-js/pull/944)
- Add deprecation annotations to signal-specific start calls. [#885](https://github.com/signalfx/splunk-otel-js/pull/885)
- Upgrade to OpenTelemetry `1.26.0` / `0.53.0`. [#945](https://github.com/signalfx/splunk-otel-js/pull/945)

## 2.11.0

- Bundle instrumentations for `undici`, `socket.io` and `lru-memoizer` by default. [#934](https://github.com/signalfx/splunk-otel-js/pull/934)
Expand Down
6 changes: 4 additions & 2 deletions docs/advanced-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ This distribution supports all the configuration options supported by the compon
| `OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT` | | Stable | Maximum allowed attribute value size. Empty value is treated as infinity
| `OTEL_SPAN_EVENT_COUNT_LIMIT` | `128` | Stable |
| `OTEL_SPAN_LINK_COUNT_LIMIT` | `1000`\* | Stable |
| `OTEL_TRACES_EXPORTER`<br>`tracing.spanExporterFactory` | `otlp` | Stable | Chooses the trace exporters. Shortcut for setting `spanExporterFactory`. Comma-delimited list of exporters. Currently supported values: `otlp`, `console`.
| `OTEL_TRACES_EXPORTER`<br>`tracing.spanExporterFactory` | `otlp` | Stable | Chooses the trace exporters. Shortcut for setting `spanExporterFactory`. Comma-delimited list of exporters. Currently supported values: `otlp`, `console`, `none`.
| `OTEL_TRACES_SAMPLER` | `parentbased_always_on` | Stable | Sampler to be used for traces. See [Sampling](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk.md#sampling)
| `OTEL_TRACES_SAMPLER_ARG` | | Stable | String value to be used as the sampler argument. Only be used if OTEL_TRACES_SAMPLER is set.
| `SPLUNK_ACCESS_TOKEN`<br>`accessToken` | | Stable | The optional access token for exporting signal data directly to SignalFx API.
Expand All @@ -80,6 +80,8 @@ The following config options can be set by passing them as tracing arguments to

- `tracing.tracerConfig`: A JS object that is merged into the default tracer config replacing any existing keys. It's passed to the tracer provider during initialization. This can be used to customize the tracer provider or tracer. Must satisfy [`TracerConfig` interface](https://github.com/open-telemetry/opentelemetry-js/blob/71ba83a0dc51118e08e3148c788b81fe711003e7/packages/opentelemetry-tracing/src/types.ts#L26)

- `tracing.resourceFactory`: A function that is invoked with the default resource detected from the environment. Can be used to change the detected attributes or return a completely new resource.

- `tracing.spanExporterFactory`: A function that accepts the tracing options. Returns a new instance of SpanExporter. When set, this function is used to create a new exporter and the returned exporter will be used in the pipeline.

- `tracing.spanProcessorFactory`: Returns a SpanProcessor instance or an array of SpanProcessor instances. When set, this function is be used to create one or more span processors. The returned processors are added to the global tracer provider and configured to process all spans generated by any tracer provider by the global provider. The function creates a new span exporter and uses it with each processor it creates. It may call `options.spanExporterFactory(options)` to create a new exporter as configured by the user.
Expand All @@ -97,7 +99,7 @@ The following config options can be set by passing them as tracing arguments to
| `OTEL_SERVICE_NAME`<br>`serviceName` | `unnamed-node-service` | Stable | The service name of this Node service.
| `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT`<br>`endpoint` | `http://localhost:4317` | Stable | The OTLP endpoint to export to.
| `OTEL_METRIC_EXPORT_INTERVAL`<br>`metrics.exportIntervalMillis` | `30000` | Stable | The interval, in milliseconds, of metrics collection and exporting.
| `OTEL_METRICS_EXPORTER`<br>`metrics.metricReaderFactory` | `otlp` | Stable | Chooses the metric exporters. Comma-delimited list of exporters. Currently supported values: `otlp`, `console`.
| `OTEL_METRICS_EXPORTER`<br>`metrics.metricReaderFactory` | `otlp` | Stable | Chooses the metric exporters. Comma-delimited list of exporters. Currently supported values: `otlp`, `console`, `none`.
| `OTEL_EXPORTER_OTLP_METRICS_PROTOCOL`<br>`metrics.metricReaderFactory` | `grpc` | Stable | Chooses the metric exporter protocol. Currently supported values: `grpc`, `http/protobuf`.
| `OTEL_RESOURCE_ATTRIBUTES` | | Stable | The resource attributes to metric data. <details><summary>Environment variable example</summary>`key1=val1,key2=val2`</details>
| `SPLUNK_METRICS_ENABLED`<br>n/a (enabled by calling `start`) | `false` | Experimental | Sets up the metrics pipeline (global meter provider, exporters).
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"dependencies": {
"@opentelemetry/api": "^1.3.0",
"@splunk/otel": "2.10.0",
"@splunk/otel": "2.12.0",
"axios": "^0.28.0",
"express": "^4.17.1"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"dependencies": {
"@opentelemetry/api": "^1.3.0",
"@splunk/otel": "2.10.0",
"@splunk/otel": "2.12.0",
"axios": "^0.28.0",
"env-cmd": "^10.1.0",
"express": "^4.17.1"
Expand Down
2 changes: 1 addition & 1 deletion examples/log-injection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"dependencies": {
"@opentelemetry/api": "^1.3.0",
"@splunk/otel": "2.10.0",
"@splunk/otel": "2.12.0",
"pino": "^6.13.3"
}
}
2 changes: 1 addition & 1 deletion examples/logs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"@opentelemetry/api": "^1.3.0",
"@splunk/otel": "2.10.0"
"@splunk/otel": "2.12.0"
}
}
2 changes: 1 addition & 1 deletion examples/mixed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"dependencies": {
"@opentelemetry/api": "^1.3.0",
"@splunk/otel": "2.10.0",
"@splunk/otel": "2.12.0",
"pino": "^6.13.2"
}
}
2 changes: 1 addition & 1 deletion examples/profiling/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
},
"dependencies": {
"@opentelemetry/api": "^1.3.0",
"@splunk/otel": "2.10.0"
"@splunk/otel": "2.12.0"
}
}
3 changes: 2 additions & 1 deletion examples/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
},
"dependencies": {
"@opentelemetry/api": "^1.3.0",
"@splunk/otel": "2.10.0",
"@splunk/otel": "2.12.0",
"express": "^4.18.2"
},
"devDependencies": {
"@types/express": "^4.17.21",
"typescript": "5.2.2"
}
}
Loading

0 comments on commit 40f50d1

Please sign in to comment.