- Add an optional workaround for Next.js span cardinality issues. Can be enabled by setting
SPLUNK_NEXTJS_FIX_ENABLED
totrue
. #957
- Add
resourceFactory
option for traces. Allows for customization of the detected resource. Previously a resource could be provided viatracerConfig
, but this overwrote the detected attributes. For backwards compatibility the latter option is still possible. #938 - Support
none
value forOTEL_TRACES_EXPORTER
andOTEL_METRICS_EXPORTER
environment variables. #939 - Use the default
OTEL_BSP_SCHEDULE_DELAY
of5000
instead of500
. This was a workaround for an oldBatchSpanProcessor
bug where it failed to flush spans fully. #940 - Disable log sending for Winston instrumentation by default. Add
winston-transport
package as a dependency in case log collection is enabled. #941 - Use a synchronous container detector from upstream. #944
- Add deprecation annotations to signal-specific start calls. #885
- Upgrade to OpenTelemetry
1.26.0
/0.53.0
. #945
- Bundle instrumentations for
undici
,socket.io
andlru-memoizer
by default. #934
- Use environment, process, host and OS detectors from upstream. Update container detector to support cgroup v2. #925
- Use explicit imports when loading instrumentations #926
- Upgrade to OpenTelemetry
1.24.0
/0.51.0
. #902
- Fix reporting of
profiling.data.total.frame.count
. #886
- Upgrade to OpenTelemetry
1.21.0
/0.48.0
. #874 - GraphQL instrumentation: spans for resolvers are no longer generated. This brings in significant performance improvements for queries hitting lots of resolvers.
SPLUNK_GRAPHQL_RESOLVE_SPANS_ENABLED=true
environment variable can be used to unignore resolve spans.
- Add missing telemetry.sdk.version to profiling payloads. #854
- Upgrade to OpenTelemetry
1.18.1
/0.45.1
. #852 - Add Linux ARM64 prebuilt binaries. #850
- Prebuild the native module for Node.js 21. #838
- Upgrade to OpenTelemetry
1.17.1
/0.44.0
. #822
- Support older libc++ ABIs. This should remove the need for a compilation step on CentOS 7 when running npm install. #806
- Compare kafka header values case insensitively. Fixed split traces when b3 propagation is used over kafka headers and the producer does not use lowercase keys. #804
September 20, 2023
- Add support for
OTEL_METRICS_EXPORTER=none
. #801
August 28, 2023
- Add missing
forceFlush
method to theNoopMeterProvider
. Some instrumentations (AWS Lambda) logged an error whenforceFlush
was unavailable. #788 #791
August 18, 2023
- Fix the error message about an unavailable exporter (e.g.
Exporter "otlp" requested through environment variable is unavailable.
) whenOTEL_TRACES_EXPORTER
is set. Workaround for open-telemetry/opentelemetry-js#3422. #783 - Explicitly set a meter provider for instrumentations.
NoopMeterProvider
is set by default. If metrics are enabled andSPLUNK_INSTRUMENTATION_METRICS_ENABLED
is set to true, instrumentation specific metrics will be emitted, for examplehttp.server.duration
from thehttp
instrumentation. #784
August 9, 2023
- Upgrade to OpenTelemetry
1.15.2
/0.41.2
. #778
August 2, 2023
- Support Node.js 20 #771
August 1, 2023
- Upgrade to OpenTelemetry
1.15.1
/0.41.1
. #761 - Fix confusing error message regarding
grpc
:@opentelemetry/instrumentation-grpc Module @grpc/grpc-js has been loaded before @opentelemetry/instrumentation-grpc so it might not work, please initialize it before requiring @grpc/grpc-js
.grpc
is internally now lazily loaded. #762 - Allow enabling and disabling instrumentations via environment variables by introducing
OTEL_INSTRUMENTATION_COMMON_DEFAULT_ENABLED
andOTEL_INSTRUMENTATION_[NAME]_ENABLED
. #769
July 1, 2023
- fix: pin OpenTelemetry dependencies to avoid multiple versions of
@opentelemetry/instrumentation
packages being loaded at the same time #745
June 27, 2023
- Fixed
logLevel
configuration option forstart
function throwing an error #741 - Added Docker image for the OpenTelemetry Operator for Kubernetes #740
May 3, 2023
- Internal: added frame count to profiling data. #726
April 5, 2023
- Fixed
@opentelemetry/instrumentation-mongoose
not being loaded. #715
March 22, 2023
- Fixed
SPLUNK_REALM
environment variable taking precedence over endpoint supplied programmatically.endpoint
now correctly overrides the endpoint created viaSPLUNK_REALM
and when both are set logs a warning. #668 - Empty environment variables are now considered as not defined. #693
- New configuration option:
SPLUNK_DEBUG_METRICS_ENABLED
/metrics.debugMetricsEnabled
. #700 When set, extra set of internal troubleshooting metrics are produced. This should only be enabled to assist debugging. Defaults tofalse
. Currently debug metrics for the CPU and memory profiler are produced, each being a histogram:splunk.profiler.cpu.start.duration
splunk.profiler.cpu.stop.duration
splunk.profiler.cpu.process.duration
splunk.profiler.heap.collect.duration
splunk.profiler.heap.process.duration
- Upgrade to OpenTelemetry
1.10.1
/0.35.1
. The full changes can be seen at OpenTelemetry JS releases:
December 1, 2022
- Deduce the service name from
package.json
if it is not explicitly configured. #625 - Fix console metric exporter omitting datapoint specific attributes. #626
November 22, 2022
For a list of major changes and features in 2.0.0
see the notes for 2.0.0-rc1
.
Additional changes in this release:
- Upgrade to OpenTelemetry JS 1.8.0 / 0.34.0. #612
- Remove
@opentelemetry/instrumentation-aws-lambda
from the bundled packages as there exists a separate lambda instrumentation and due to the package not being compatible with@opentelemetry/instrumentation@0.34.0
. #612. @opentelemetry/api
is now a peer dependency and the required version has been bumped to1.3.0
.OTEL_LOG_LEVEL
now also sets up the logging pipeline, thus diagnostic logging can now be enabled just by enabling it via the environment variable. The supported log level values arenone
,verbose
,debug
,info
,warn
,error
. The logging pipeline can additionally be enabled by settinglogLevel
configuration option. #605.process.command
,process.command_line
andprocess.runtime.description
resource attributes have been removed from the automatic process detection. #613OTEL_TRACES_EXPORTER
now only supportsotlp
,console
or both (e.g.OTEL_TRACES_EXPORTER=otlp,console
). #599- Add support for
OTEL_EXPORTER_OTLP_PROTOCOL
,OTEL_EXPORTER_OTLP_TRACES_PROTOCOL
,OTEL_EXPORTER_OTLP_METRICS_PROTOCOL
. The supported values aregrpc
(the default) orhttp/protobuf
. #599 #614
October 31, 2022
- Omit setting the default endpoint for metrics, as OpenTelemetry OTLP metrics exporters already have their own default configuration #592
October 28, 2022
-
There is a new function called
start
, which can be used to start all 3 signals:const { start } = require('@splunk/otel'); start({ serviceName: 'my-node-service', metrics: true, // Sets up OpenTelemetry metrics pipeline for custom metrics profiling: true, // Enables CPU profiling });
If you have been only been using tracing, then
startTracing
can be replaced like this:const { start } = require('@splunk/otel'); start({ serviceName: 'my-node-service', endpoint: 'http://collector:4317', });
Signal-specific configuration options can still be passed in:
const { start } = require('@splunk/otel'); start({ serviceName: 'my-node-service', tracing: { instrumentations: [ // Custom instrumentation list ], }, metrics: { runtimeMetricsEnabled: true, }, profiling: { memoryProfilingEnabled: true, } });
For all possible options see Advanced Configuration.
The deprecated functions are still available, but using them will log a deprecation message.
-
SignalFx metrics SDK has been removed and replaced with OpenTelemetry Metrics SDKs. The internal SignalFx client is no longer available to users, if you have been using custom metrics with the SignalFx client provided by Splunk OpenTelemetry JS distribution, see the Migrate from the SignalFx Tracing Library for NodeJS in the official documentation.
Runtime metric names are now using OpenTelemetry conventions, the following is a list of changed metric names:
SignalFx (no longer available) OpenTelemetry nodejs.memory.heap.total
process.runtime.nodejs.memory.heap.total
nodejs.memory.heap.used
process.runtime.nodejs.memory.heap.used
nodejs.memory.rss
process.runtime.nodejs.memory.rss
nodejs.memory.gc.size
process.runtime.nodejs.memory.gc.size
nodejs.memory.gc.pause
process.runtime.nodejs.memory.gc.pause
nodejs.memory.gc.count
process.runtime.nodejs.memory.gc.count
nodejs.event_loop.lag.max
process.runtime.nodejs.event_loop.lag.max
nodejs.event_loop.lag.min
process.runtime.nodejs.event_loop.lag.min
-
It is no longer necessary to add instrumentation packages to your
package.json
file, unless you intend to use instrumentations not bundled in the distribution.For the list of instrumentations bundled by default see Default instrumentation packages.
-
It is no longer possible to use the
jaeger-thrift-splunk
value forOTEL_TRACES_EXPORTER
to send traces via Jaeger Thrift over HTTP.The default exporting format is still OTLP over gRPC, however it is now possible to use OTLP over HTTP by setting
OTLP_TRACES_EXPORTER
environment variable tootlp-splunk
.If you want to keep using Jaeger exporter, you can use the @opentelemetry/exporter-jaeger package by specifying a custom span exporter for the tracing configuration:
const { start } = require('@splunk/otel'); const { JaegerExporter } = require('@opentelemetry/exporter-jaeger'); start({ serviceName: 'my-node-service', tracing: { spanExporterFactory: (options) => { return new JaegerExporter({ serviceName: options.serviceName, // Additional config }) } }, });
-
Minimum Node.js version has been bumped to 14 due to OpenTelemetry SDKs dropping support for Node.js 12.
Wed, 22 Sep 2022 09:24:01 GMT
- chore: upgrade to signalfx 7.5.0 for Node.js 18 support #557
- fix: don't log a diagnostic error when profiling is started #556
Mon, 19 Sep 2022 12:41:01 GMT
- feat: add detector for container ID (cgroup v1) #515
- feat: memory profiling #524
- fix: support compilation on CentOS 7 #552
Fri, 26 Aug 2022 09:07:44 GMT
- feat: add support for SPLUNK_REALM (siimkallas@gmail.com)
- feat: export in pprof (rauno56@gmail.com)
Thu, 28 Jul 2022 07:45:57 GMT
- feat: start profiling syncronously (rauno56@gmail.com)
- fix: profiling: avoid biased samples due to self sampling
Fri, 15 Jul 2022 15:39:32 GMT
- feat: add a way to collect unformatted profiling data (rauno56@gmail.com)
- fix: use a 500ms default delay for batch span processor to avoid excessive throttling
- fix: support HTTP schemes for profiling logs exporter
Mon, 13 Jun 2022 08:22:59 GMT
- feat: call shutdown in
stopTracing()
(rauno56@gmail.com)
Fri, 03 Jun 2022 13:48:20 GMT
- chore: remove support for deprecated
opentelemetry-instrumentation-amqplib
(rauno56@gmail.com) - chore: remove support for deprecated
opentelemetry-instrumentation-aws-sdk
(rauno56@gmail.com) - feat: throw when
startTracing
is called twice (rauno56@gmail.com) - feat: throw when extraneous properties are provided (rauno56@gmail.com)
- chore: remove support for Node versions before LTS 12 (rauno56@gmail.com)
- feat: upgrade OTel deps and bump min instrumentation versions (rauno56@gmail.com)
- feat: prebuild for node@18 (rauno56@gmail.com)
- feat: add splunk.distro.version resource attribute (rauno56@gmail.com)
- feat: bring in detectors for os.* and host.* attributes (rauno56@gmail.com)
- feat: add a generic start API (rauno56@gmail.com)
- feat: detect resource from process (rauno56@gmail.com)
- feat: throw when unexpected configuration provided (rauno56@gmail.com)
- feat: implement setting up ConsoleSpanExporter via env var (rauno56@gmail.com)
Thu, 21 Apr 2022 17:01:07 GMT
- refactor: remove enabled flag from startMetrics options #429
- chore: update minimist to 1.2.6 #435
- chore: remove unnecessary dependency on jaeger-client #445
Mon, 28 Feb 2022 12:54:34 GMT
- add SPLUNK_REDIS_INCLUDE_COMMAND_ARGS env var to include redis command args in span's db.statement (siimkallas@gmail.com)
Thu, 10 Feb 2022 13:37:02 GMT
- feat: implement the alpha version of profiling support (siimkallas@gmail.com)
- chore: update dependencies (rauno56@gmail.com)
Thu, 11 Nov 2021 15:56:29 GMT
- feat: add runtime metrics (siimkallas@gmail.com)
- feat: remove OTEL_TRACE_ENABLED (rauno56@gmail.com)
Tue, 12 Oct 2021 06:38:40 GMT
- feat: remove support for
maxAttrLength
(rauno56@gmail.com) - feat: warn about missing service.name and no instrumentations (rauno56@gmail.com)
- feat: give OTEL_SPAN_LINK_COUNT_LIMIT and OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT GDI spec compliant defaults (rauno56@gmail.com)
- chore: update core OTel deps to v1.0 (rauno56@gmail.com)
Mon, 04 Oct 2021 12:27:07 GMT
- feat: use gRPC by default and Jaeger for collectorless scenario (Rauno56@gmail.com)
- feat: remove logInjectionEnabled and SPLUNK_LOGS_INJECTION options (Rauno56@gmail.com)
- feat: add the option to capture URL parameters (siimkallas@gmail.com)
- Update development dependencies (Rauno56@gmail.com)
- Updated OTel dependencies (Rauno56@gmail.com)
Tue, 07 Sep 2021 12:05:40 GMT
- Added change management using beachball (jakubmal+github@gmail.com)
- Make w3c(tracecontext, baggage) the default propagation mechanism (Rauno56@gmail.com)
- Support for Synthetic Run identification (#156)
- Add support for injecting trace context into logs. (#121)
- Rename
SPLUNK_CONTEXT_SERVER_TIMING_ENABLED
(#149) - Upgrade to OpenTelemetry SDK 0.22.0, API 1.0.0. (#153)
- Added support for
aws-sdk
,mongoose
,sequelize
,typeorm
andkafkajs
. (#83)
- Context management should not work properly on older versions of Node.js (<14.8). (#53)
- Replaced
SPLUNK_TRACE_EXPORTER_URL
withOTEL_EXPORTER_JAEGER_ENDPOINT
. - The default propagator was changed from B3 to a composite B3 + W3C tracecontext propagator. This means splunk-otel-js will now support both B3 and tracecontext at the same time.
startTracing()
options now accepts apropagatorFactory
option which can be used configure custom text map propagator.- Listed instrumentations as (optional) peer dependencies. This makes require()'ing instrumentations safer despite @splunk/otel not listing them as dependencies. Marking them optional ensures npm7 will not automatically install these packages. Note that this will still result in warnings for users on npm <7.
- Added suport for the following instrumentations out of the box:
- @opentelemetry/instrumentation-express
- @opentelemetry/instrumentation-ioredis
- @opentelemetry/instrumentation-mongodb
- @opentelemetry/instrumentation-mysql
- @opentelemetry/instrumentation-net
- @opentelemetry/instrumentation-pg
- @opentelemetry/instrumentation-hapi
- Removed support for the following instrumentations:
- @opentelemetry/hapi-instrumentation
- Changed environment variable prefix from
SPLK_
toSPLUNK_
. All environment variables must be updated for the library to continue to work.
-
startTracing()
options now accepts atracerConfig
option which is merged with the default tracer config and passed on to the tracer provider. -
Added
spanExporterFactory
option tostartTracing()
options.spanExporterFactory
receives a processedOptions
instance and returns a new instance ofExporter
. -
Replaced
spanProcessor
option withspanProcessorFactory
.startTracing()
options now accepts aspanProcessorFactory
function. The function accept a processedOptions
instance and returns aSpanProcessor
instance or an array ofSpanProcessor
instances. It can be used to configure tracing with custom Span Processor. If it returns multiple span processors, all of them will be used.