All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning. The format is based on Keep a Changelog.
- Skip instrumentation of HANA driver, if it does it itself
- By default,
@cap-js/hana
's promisification of the driver API is wrapped- Disable via config
cds.requires.telemetry.tracing._hana_prom = false
- Disable via config
- User-provided instances of SAP Cloud Logging should have either tag
cloud-logging
orCloud Logging
- Database span attributes
- Don't crash in case there are errors while determining the attributes for the current span
- Handle SAP Passport inside
tracer.startActiveSpan()
- Don't crash in case property
instrumentationLibrary
of parent span is undefined
- Improved support for tracing messaging services and
cds.spawn
- Support for adding custom spans to trace hierarchy via
tracer.startActiveSpan()
- Trace attribute
db.client.response.returned_rows
for queries viacds.ql
- Option to pass custom config to span processor via
cds.requires.telemetry.tracing.processor.config
- Support for loading instrumentation hooks via path relative to
cds.root
.- The respective module must export either a function or, for bundling purposes, an object with a function named after the respective hook.
- Example based on
@opentelemetry/instrumentation-http
:"instrumentations": { "http": { "config": { "ignoreIncomingRequestHook": "./lib/MyIgnoreIncomingRequestHook.js" } } }
- Support for ignoring incoming requests that match a certain base path via
cds.requires.telemetry.tracing.sampler.ignoreIncomingPaths = []
(beta) - Experimental!: Trace HANA interaction via
@cap-js/hana
's promisification of the driver API for increased accuracy- Enable via config
cds.requires.telemetry.tracing._hana_prom
- Requires
@cap-js/hana^1.7.0
- Enable via config
- Experimental!: Intercept and export application logs (cf.
cds.log()
) via OpenTelemetry- Enable by adding section
logging
tocds.requires.telemetry
as follows (usinggrpc
as an example):"logging": { "exporter": { "module": "@opentelemetry/exporter-logs-otlp-grpc", "class": "OTLPLogExporter" } }
- Requires additional dependencies
@opentelemetry/api-logs
,@opentelemetry/sdk-logs
, and the configured exporter module (cds.requires.telemetry.logging.module
)
- Enable by adding section
- Default config
ignoreIncomingPaths: ['/health']
moved fromcds.requires.telemetry.instrumentations.http.config
tocds.requires.telemetry.tracing.sampler
- User-provided instances of SAP Cloud Logging should have a tag
cloud-logging
(not a name matchingcloud-logging
)
- Internal
cds._telemetry
- ConsoleSpanExporter:
cds.context
may be undefined in local scripting scenarios
- Use attribute
url.path
(with fallback to deprecatedhttp.target
) for sampling decision
- Predefined kind
telemetry-to-otlp
that creates exporters based on OTLP exporter configuration via environment variables - If
@opentelemetry/instrumentation-runtime-node
is in the project's dependencies but not incds.requires.telemetry.instrumentations
, it is registered automatically- Disable via
cds.requires.telemetry.instrumentations.instrumentation-runtime-node = false
- Disable via
- Experimental!: Propagate W3C trace context to SAP HANA via session context
SAP_PASSPORT
- Enable via environment variable
SAP_PASSPORT
- Enable via environment variable
- Base config moved to new
cds.requires.kinds.telemetry
for improved config merging
- Built-in
ConsoleMetricExporter
uses correct attribute nameprocess.cpu.state
while exporting host metrics - Exporting traces to the console in the presence of a traceparent header
- Explicitly pass own providers when registering instrumentations (the global providers may be influenced by, for example, Dynatrace OneAgent)
- Support for tracing native db statements (i.e.,
cds.run('SELECT * FROM DUMMY')
) - Support for SAP Cloud Logging credentials via user-provided service
- Support for adding
@opentelemetry/instrumentation-runtime-node
npm add @opentelemetry/instrumentation-runtime-node
- To
cds.requires.telemetry.instrumentations
, add:"instrumentation-runtime-node": { "class": "RuntimeNodeInstrumentation", "module": "@opentelemetry/instrumentation-runtime-node" }
- Instrumentations are registered after tracing and metrics are set up
telemetry-to-dynatrace
: Regardless of whether Dynatrace OneAgent is present or not, if dependency@opentelemetry/exporter-trace-otlp-proto
is present,@cap-js/telemetry
will export the traces via OpenTelemetry.
- Tracing of db statements without active span
- Only startup plugin if invoked for runtime (e.g., via cli
cds serve
)
- Detect build job started via
@sap/cds-dk/bin/cds.js
- Avoid credentials validation during
cds build
- Support for local modules (e.g., exporters) via
[...].module = '<path relative to cds.root>'
- Disable pool metrics via
cds.requires.telemetry.metrics._db_pool = false
(beta)
- Get credentials from
cds.env
- Validate existence of credentials only for configured kind
- HTTP attributes only for root spans (reduces trace payload size)
- Support for own, high resolution timestamps
- Enable via
cds.requires.telemetry.tracing.hrtime = true
- Enabled by default in development profile
- Enable via
- Register span processor also if tracer provider is initialized by a different module
- Support for so-called Pull Metric Exporter (e.g.,
@opentelemetry/exporter-prometheus
) - Tenant-dependent DB attributes
- By default, all
system.*
metrics collected by@opentelemetry/host-metrics
are ignored- Disable change via environment variable
HOST_METRICS_RETAIN_SYSTEM=true
- Disable change via environment variable
- Metric exporter's property
temporalityPreference
always gets defaulted toDELTA
- Was previously only done for kind
telemetry-to-dynatrace
- Set custom value via
cds.requires.telemetry.metrics.exporter.config.temporalityPreference
- Was previously only done for kind
- Identification of first-level spans in built-in
ConsoleSpanExporter
- Re-use
TracerProvider
andMeterProvider
that were initialized by a different module (OpenTelemetry only allows one-time initialization)
NonRecordingSpan
s are handled correctly
- Support for exporting traces to Dynatrace via OpenTelemetry exporter (instead of Dynatrace OneAgent)
- Support for Dynatrace credentials via user-provided service
@opentelemetry/host-metrics
is automatically fired up, if it is in the project's dependencies
- Predefined kind for SAP Cloud Logging (
telemetry-to-cloud-logging
) - Built-in
ConsoleMetricExporter
prints DB pool and other metrics separately
- Initial release