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.
- Prefer
VCAP_APPLICATION.nameovernameinpackage.jsonfor app name resolution
- Provide custom resource attributes via
cds.requires.telemetry.resource.attributes - Added new queue statistic
queue.processing_failedthat tracks the number of failed attempts at processing tasks per instance, per tenant, per service - Support for optimized queue runner (in
@sap/cds^9.6) - Support for
@cap-js/hana's built-in pool
W3CBaggagePropagatoradded to the list of default propagators (cds.requires.telemetry.tracing.propagators)
- Resolving of
OTEL_LOG_LEVEL - Skip registration of queue metrics collection for unknown service
queue.med_storage_time_in_secondsis now correctly calculated per service and ignoring cold entriesqueue.min_storage_time_in_secondsandqueue.max_storage_time_in_secondsare no longer switched up- Trace propagation in production by ensuring
httpsgets wrapped
- Handle pre-initialized
LoggerProvider
- Skip persistent queue metrics setup if no database is connected
- SAP Passport propagation with
cds.requires.telemetry.tracing._hana_prom = true
- Ensure initialization of persistent queue statistics
- Adopt stable semantic conventions
- Observation of Persistent Queue metrics (beta)
- Disable via config
cds.requires.telemetry.metrics._queue = false
- Disable via config
- Missing SQL-related attributes with
cds.requires.telemetry.tracing._hana_prom = true
- Support for
@sap/cds^9
- Remove stack from log message, if present
- Version check in TypeScript projects
- Skip instrumentation of HANA driver, if it does it itself
telemetry-to-otlp: Automatically switch togRPC(from defaulthttp/protobuf) when exporting to an endpoint with port4317- Version check for
@opentelemetrydependencies (OpenTelemetry SDK 2.0 is not yet supported)
- 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
NonRecordingSpans do not haveattributes
- Inofficial instrumentation of legacy OData server
- User-provided instances of SAP Cloud Logging should have either tag
cloud-loggingorCloud 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
instrumentationLibraryof 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_rowsfor 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
loggingtocds.requires.telemetryas follows (usinggrpcas 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.configtocds.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.contextmay be undefined in local scripting scenarios
- Use attribute
url.path(with fallback to deprecatedhttp.target) for sampling decision
- Predefined kind
telemetry-to-otlpthat creates exporters based on OTLP exporter configuration via environment variables - If
@opentelemetry/instrumentation-runtime-nodeis 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.telemetryfor improved config merging
- Built-in
ConsoleMetricExporteruses correct attribute nameprocess.cpu.statewhile 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-nodenpm 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-protois present,@cap-js/telemetrywill 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-metricsare ignored- Disable change via environment variable
HOST_METRICS_RETAIN_SYSTEM=true
- Disable change via environment variable
- Metric exporter's property
temporalityPreferencealways 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
TracerProviderandMeterProviderthat were initialized by a different module (OpenTelemetry only allows one-time initialization)
NonRecordingSpans 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-metricsis automatically fired up, if it is in the project's dependencies
- Predefined kind for SAP Cloud Logging (
telemetry-to-cloud-logging) - Built-in
ConsoleMetricExporterprints DB pool and other metrics separately
- Initial release