22nd of November, 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
31st of October, 2022
- Omit setting the default endpoint for metrics, as OpenTelemetry OTLP metrics exporters already have their own default configuration #592
28th of October, 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 migration guide for how to start using custom metrics via OpenTelemetry.
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.