Skip to content

Releases: open-telemetry/opentelemetry-js

v2.7.0

17 Apr 11:26
a0476ee

Choose a tag to compare

2.7.0

🚀 Features

  • feat(sdk-logs): implement log creation metrics #6433 @anuraaga
  • feat(sdk-metrics): add the cardinalitySelector argument to PeriodicExportingMetricReaders
    #6460 @starzlocker
  • feat(opentelemetry-core): add extra checks on internal merge function for safety #6587 @maryliag

🐛 Bug Fixes

  • fix(opentelemetry-resources): do not discard OTEL_RESOURCE_ATTRIBUTES when it contains empty kv pairs

🏠 Internal

  • test(exporter-zipkin): fix broken browser test assertions and add missing coverage #6566 @overbalance
  • fix(sdk-metrics): repair ExponentialHistogram tests #6565 @overbalance

experimental/v0.215.0

17 Apr 11:26
a0476ee

Choose a tag to compare

0.215.0

💥 Breaking Changes

  • feat(sdk-logs)!: add required forceFlush() to LogRecordExporter interface #6356 @pichlermarc
    • (user-facing): LogRecordExporter interface now requires a forceFlush() method to be implemented. Custom exporters will need to implement this method to continue working with the Logs SDK.
  • feat(api-logs, sdk-logs)!: add Logger#enabled() #6371 @david-luna

🚀 Features

  • feat(otlp-transformer): add custom protobuf logs serializer #6228 @pichlermarc
  • feat(otlp-transformer): add custom protobuf logs export response deserializer #6530 @pichlermarc

🐛 Bug Fixes

  • fix(instrumentation-fetch): preserve init overrides when input is a Request object #6421 @akandic47
  • fix(otlp-exporter-base): limit Node.js HTTP transport response body to 4 MiB #6552 @kartikgola
  • fix(instrumentation-fetch): avoid unwrapping fetch API when disabling #6575 @david-luna
  • fix(web-common): add check for possible unsafe json parse #6589 @maryliag
  • fix(otlp-transformer): add check for possible unsafe json parse #6588 @maryliag

v2.6.1

25 Mar 15:54
7e74509

Choose a tag to compare

2.6.1

🐛 Bug Fixes

  • fix(opentelemetry-instrumentation): improve _warnOnPreloadedModules function not to show warning logs when the module is not marked as loaded #6095 @rlj1202
  • fix(sdk-trace-base): derive internal SpanOptions from API type to prevent drift #6478 @overbalance
  • fix(span): enforce attributePerEventCountLimit, attributePerLinkCountLimit, linkCountLimit, and attributeValueLengthLimit for event/link attributes #6479 @overbalance

🏠 Internal

  • chore: enforce import type for type-only imports via ESLint #6467 @overbalance
  • perf(sdk-trace-base): avoid Object.entries in Span.setAttributes #6514 @daniellockyer
  • perf(sdk-trace-base): optimize Span.{addEvent,addLink} performance #6516 @daniellockyer
  • test(bundlers): broaden bundler test coverage and assert known protobuf dynamic-require failures #6482 @overbalance

experimental/v0.214.0

25 Mar 15:54
7e74509

Choose a tag to compare

0.214.0

💥 Breaking Changes

  • feat(configuration)!: rename OTEL_EXPERIMENTAL_CONFIG_FILE to OTEL_CONFIG_FILE #6486 @maryliag
  • refactor!(otlp-grpc-exporter-base): remove headers from gRPC exporter config type, passing headers now results in a compile-time error instead of being silently ignored #6487

🚀 Features

🐛 Bug Fixes

  • fix(opentelemetry-instrumentation): access require via globalThis to avoid webpack analysis #6481 @overbalance
  • fix(sdk-logs): fix inflated droppedAttributesCount when updating existing attribute keys #6479 @overbalance
  • fix(instrumentation-fetch): do not modify the returned type of fetch #6521 @dyladan
  • fix(opentelemetry-sdk-node): add missing @opentelemetry/otlp-exporter-base dependency #6520 @gotgenes

🏠 Internal

api/v1.9.1

25 Mar 15:54
7e74509

Choose a tag to compare

1.9.1

🐛 (Bug Fix)

  • fix(api): prioritize esnext export condition as it is more specific #5458
  • fix(api): update diag consoleLogger to use original console methods to prevent infinite loop when a console instrumentation is present #6395
  • fix(api): use Attributes instead of deprecated SpanAttributes in SpanOptions #6478 @overbalance
  • fix(diag): change types in DiagComponentLogger from any to unknown#5478 @loganrosen
  • fix(api): re-introduce fallback chain for global utils #6523 @pichlermarc

🏠 (Internal)

  • refactor(api): refactor to avoid circular deps by merging observable types into Metric.ts #6441 @pichlermarc
  • refactor(api): remove "export *" in favor of explicit named exports #4880 @robbkidd
  • chore: enable tsconfig isolatedModules #5697 @legendecas
  • chore: disallow constructor parameter property syntax #6187 @legendecas
  • refactor(api): remove platform-specific globalThis, use globalThis directly #6208 @overbalance
  • chore(api): mark ProxyTracerProvider as deprecated #6328 @cjihrig
  • chore: enforce import type for type-only imports via ESLint #6467 @overbalance
  • perf(api): improve isValidSpanId, isValidTraceId performance #5714 @seemk

v2.6.0

03 Mar 22:56
541e1b4

Choose a tag to compare

2.6.0

💥 Breaking Changes

  • fix(resources): update OTEL_RESOURCE_ATTRIBUTES parsing to match spec changes (open-telemetry/opentelemetry-specification#4856) #6261 @JacksonWeber
    • Important: This fix is included in the "breaking changes" section because it can be breaking for some edge case usage of OTEL_RESOURCE_ATTRIBUTES:
      • export OTEL_RESOURCE_ATTRIBUTES=foo=bar,spam will now be fully ignored, because the spam entry is invalid (missing =). Per spec, any parsing error results in ignoring the entire environment variable.
      • export OTEL_RESOURCE_ATTRIBUTES='wat=" spaces "' will now result in {"wat": "\" spaces \""} with the double-quotes included in the value. Before this change the implementation included brittle double-quoting to allow leading and trailing whitespace in the value. To support leading or trailing whitespace now, you must percent-encode the whitespace. Internal whitespace still works without encoding, e.g. export OTEL_RESOURCE_ATTRIBUTES='green=eggs and ham'.

🚀 Features

🐛 Bug Fixes

  • fix(sdk-trace-web): propagate optimised flag in getElementXPath recursion #6335 @akkupratap323

experimental/v0.213.0

03 Mar 22:56
541e1b4

Choose a tag to compare

0.213.0

💥 Breaking Changes

  • fix(api-logs)!: drop lingering includeTraceContext from LoggerOptions type #6451 @trentm

🚀 Features

  • feat(instrumentation-http): provide http.request.header.<key> at server span creation time #6396 @vitorvasc

🐛 Bug Fixes

  • fix(instrumentation-http): guard against double-instrumentation if loaded with require('http') and import 'http' #6428 @trentm
  • fix(otlp-exporter-base): handle response error #6412 @pichlermarc
    • Fixes a bug where when the response header was received, but the connection was reset by the server,
      an unhandled error would be thrown.
  • fix(otlp-exporter-base): remove sendBeacon in favor of fetch with keepalive #6391 @overbalance
    • (user-facing) createOtlpSendBeaconExportDelegate will be removed in a future version
  • fix(otlp-transformer): downgrade protobufjs to version ^7.0.0 #6418 @vitorvasc
  • fix(instrumentation-fetch): handle HeadersInit tuple arrays in _addHeaders #6341 @overbalance @imadha

semconv/v1.40.0

26 Feb 15:15
661cd84

Choose a tag to compare

1.40.0

🚀 Features

  • feat: update semantic conventions to v1.40.0 #6438
    • Semantic Conventions v1.40.0: changelog | latest docs
    • @opentelemetry/semantic-conventions (stable) changes: 2 added exports
    • @opentelemetry/semantic-conventions/incubating (unstable) changes: 11 newly deprecated exports, 56 added exports

Stable changes in v1.40.0

2 added exports
ATTR_SERVICE_INSTANCE_ID // service.instance.id
ATTR_SERVICE_NAMESPACE   // service.namespace

Unstable changes in v1.40.0

11 newly deprecated exports
METRIC_RPC_CLIENT_REQUEST_SIZE     // rpc.client.request.size: Removed, no replacement at this time.
METRIC_RPC_CLIENT_RESPONSE_SIZE    // rpc.client.response.size: Removed, no replacement at this time.
METRIC_RPC_SERVER_REQUEST_SIZE     // rpc.server.request.size: Removed, no replacement at this time.
METRIC_RPC_SERVER_RESPONSE_SIZE    // rpc.server.response.size: Removed, no replacement at this time.
METRIC_SYSTEM_MEMORY_SHARED        // system.memory.shared: Replaced by `system.memory.linux.shared`.
EVENT_RPC_MESSAGE                  // rpc.message: Deprecated, no replacement at this time.
ATTR_ERROR_MESSAGE                 // error.message: Use domain-specific error message attribute. For example, use `feature_flag.error.message` for feature flag errors.
ATTR_RPC_MESSAGE_COMPRESSED_SIZE   // rpc.message.compressed_size: Deprecated, no replacement at this time.
ATTR_RPC_MESSAGE_ID                // rpc.message.id: Deprecated, no replacement at this time.
ATTR_RPC_MESSAGE_TYPE              // rpc.message.type: Deprecated, no replacement at this time.
ATTR_RPC_MESSAGE_UNCOMPRESSED_SIZE // rpc.message.uncompressed_size: Deprecated, no replacement at this time.
56 added exports
METRIC_JVM_FILE_DESCRIPTOR_LIMIT                 // jvm.file_descriptor.limit

METRIC_K8S_SERVICE_ENDPOINT_COUNT                // k8s.service.endpoint.count
METRIC_K8S_SERVICE_LOAD_BALANCER_INGRESS_COUNT   // k8s.service.load_balancer.ingress.count

METRIC_SYSTEM_MEMORY_LINUX_SHARED                // system.memory.linux.shared

EVENT_DB_CLIENT_OPERATION_EXCEPTION              // db.client.operation.exception
EVENT_HTTP_CLIENT_REQUEST_EXCEPTION              // http.client.request.exception
EVENT_HTTP_SERVER_REQUEST_EXCEPTION              // http.server.request.exception
EVENT_RPC_CLIENT_CALL_EXCEPTION                  // rpc.client.call.exception
EVENT_RPC_SERVER_CALL_EXCEPTION                  // rpc.server.call.exception

ATTR_FEATURE_FLAG_ERROR_MESSAGE                  // feature_flag.error.message

ATTR_GCP_GCE_INSTANCE_GROUP_MANAGER_NAME         // gcp.gce.instance_group_manager.name
ATTR_GCP_GCE_INSTANCE_GROUP_MANAGER_REGION       // gcp.gce.instance_group_manager.region
ATTR_GCP_GCE_INSTANCE_GROUP_MANAGER_ZONE         // gcp.gce.instance_group_manager.zone

ATTR_GEN_AI_AGENT_VERSION                        // gen_ai.agent.version
GEN_AI_OPERATION_NAME_VALUE_RETRIEVAL            // "retrieval"
ATTR_GEN_AI_RETRIEVAL_DOCUMENTS                  // gen_ai.retrieval.documents
ATTR_GEN_AI_RETRIEVAL_QUERY_TEXT                 // gen_ai.retrieval.query.text
ATTR_GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS    // gen_ai.usage.cache_creation.input_tokens
ATTR_GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS        // gen_ai.usage.cache_read.input_tokens

ATTR_K8S_SERVICE_ANNOTATION                      // (key) => `k8s.service.annotation.${key}`
ATTR_K8S_SERVICE_ENDPOINT_ADDRESS_TYPE           // k8s.service.endpoint.address_type
  K8S_SERVICE_ENDPOINT_ADDRESS_TYPE_VALUE_FQDN     // "FQDN"
  K8S_SERVICE_ENDPOINT_ADDRESS_TYPE_VALUE_IPV4     // "IPv4"
  K8S_SERVICE_ENDPOINT_ADDRESS_TYPE_VALUE_IPV6     // "IPv6"
ATTR_K8S_SERVICE_ENDPOINT_CONDITION              // k8s.service.endpoint.condition
  K8S_SERVICE_ENDPOINT_CONDITION_VALUE_READY       // "ready"
  K8S_SERVICE_ENDPOINT_CONDITION_VALUE_SERVING     // "serving"
  K8S_SERVICE_ENDPOINT_CONDITION_VALUE_TERMINATING // "terminating"
ATTR_K8S_SERVICE_ENDPOINT_ZONE                   // k8s.service.endpoint.zone
ATTR_K8S_SERVICE_LABEL                           // (key) => `k8s.service.label.${key}`
ATTR_K8S_SERVICE_NAME                            // k8s.service.name
ATTR_K8S_SERVICE_PUBLISH_NOT_READY_ADDRESSES     // k8s.service.publish_not_ready_addresses
ATTR_K8S_SERVICE_SELECTOR                        // (key) => `k8s.service.selector.${key}`
ATTR_K8S_SERVICE_TRAFFIC_DISTRIBUTION            // k8s.service.traffic_distribution
ATTR_K8S_SERVICE_TYPE                            // k8s.service.type
  K8S_SERVICE_TYPE_VALUE_CLUSTER_IP                // "ClusterIP"
  K8S_SERVICE_TYPE_VALUE_EXTERNAL_NAME             // "ExternalName"
  K8S_SERVICE_TYPE_VALUE_LOAD_BALANCER             // "LoadBalancer"
  K8S_SERVICE_TYPE_VALUE_NODE_PORT                 // "NodePort"
ATTR_K8S_SERVICE_UID                             // k8s.service.uid

ATTR_OPENAI_API_TYPE                             // openai.api.type
  OPENAI_API_TYPE_VALUE_CHAT_COMPLETIONS           // "chat_completions"
  OPENAI_API_TYPE_VALUE_RESPONSES                  // "responses"

ATTR_ORACLE_DB_DOMAIN                            // oracle.db.domain
ATTR_ORACLE_DB_INSTANCE_NAME                     // oracle.db.instance.name
ATTR_ORACLE_DB_NAME                              // oracle.db.name
ATTR_ORACLE_DB_PDB                               // oracle.db.pdb
ATTR_ORACLE_DB_SERVICE                           // oracle.db.service
ATTR_ORACLE_CLOUD_REALM                          // oracle_cloud.realm

ATTR_PPROF_SCOPE_DEFAULT_SAMPLE_TYPE             // pprof.scope.default_sample_type
ATTR_PPROF_SCOPE_SAMPLE_TYPE_ORDER               // pprof.scope.sample_type_order

ATTR_SERVICE_CRITICALITY                         // service.criticality
  SERVICE_CRITICALITY_VALUE_CRITICAL               // "critical"
  SERVICE_CRITICALITY_VALUE_HIGH                   // "high"
  SERVICE_CRITICALITY_VALUE_LOW                    // "low"
  SERVICE_CRITICALITY_VALUE_MEDIUM                 // "medium"

v2.5.1

12 Feb 18:44
ad92be4

Choose a tag to compare

2.5.1

🐛 Bug Fixes

  • fix(opentelemetry-sdk-node): the custom value from env variable for service.instance.id should take priority over random uuid as backup #6345 @maryliag

🏠 Internal

  • perf(sdk-trace-base): use Uint8Array for browser RandomIdGenerator #6209 @overbalance
  • test(sdk-trace-base): remove obsolete TypeScript and platform workarounds #6327 @overbalance
  • fix(example-web): update Docker config and deps for collector #6342 @overbalance
  • perf(sdk-trace-base): optimize setAttribute performance #6283 @AbhiPrasad
  • refactor(core): remove unnecessary closure in _export() #6360 @cjihrig

experimental/v0.212.0

12 Feb 18:44
ad92be4

Choose a tag to compare

0.212.0

💥 Breaking Changes

  • feat(sdk-logs)!: move environment variable configuration to @opentelemetry/sdk-node #6325 @pichlermarc
    • (user-facing): environment variable configuration is no longer applied automatically when instantiating SDK components
      (LoggerProvider, BatchLogRecordProcessor) directly from @opentelemetry/sdk-logs. Please migrate to using
      NodeSDK from @opentelemetry/sdk-node to get automatic environment variable configuration.

🚀 Features

  • feat(configuration): add Prometheus exporter support #6400 @MikeGoldsmith
  • feat(sampler-composite): add ComposableAnnotatingSampler and ComposableRuleBasedSampler #6305 @trentm
  • feat(configuration): parse config for rc 3 #6304 @maryliag
  • feat(instrumentation): use the internals: true option with import-in-the-middle hook, allowing instrumentations to hook internal files in ES modules #6344 @trentm

🐛 Bug Fixes

  • fix(configuration): remove default propagator initialization #6399 @MikeGoldsmith
  • fix(instrumentation-fetch): preserve Response.url, type, and redirected properties #6243 @AnubhavPurohit691
    • The fetch instrumentation now preserves the read-only url, type, and redirected properties from the original Response object when wrapping it with a Proxy. This fixes issues where code relying on these properties (e.g., CORS type detection) would fail with instrumented fetch.
  • fix(exporter-prometheus): add missing @opentelemetry/semantic-conventions dependency #6330 @omizha
  • fix(otlp-transformer): correctly handle Uint8Array attribute values when serializing to JSON #6348 @pichlermarc
  • fix(otlp-exporter-base): fix unwanted instrumentation of the fetch exports when context is not propagated #6353 @david-luna

🏠 Internal