github open-telemetry/opentelemetry-cpp v1.29.0
v1.29.0 release

2 hours ago

v1.29.0 release

Release of:

  • opentelemetry-api
  • opentelemetry-sdk
  • exporter packages

Breaking changes:

  • [CONFIGURATION] Align declarative configuration schema defaults with
    OpenTelemetry Configuration Schema v1.1.0
    #4432

    • When a YAML field is omitted, the parsed configuration model now uses
      these schema defaults instead of the previous legacy values:
      • attribute_limits.attribute_value_length_limit,
        logger_provider.limits.attribute_value_length_limit, and
        tracer_provider.limits.attribute_value_length_limit default to no limit
        (unlimited attribute value length) instead of 4096 bytes.
      • batch log record processor schedule_delay defaults to 1000 ms instead
        of 5000 ms (more frequent batch exports when the field is omitted).
      • periodic metric reader interval defaults to 60000 ms instead of 5000 ms
        (less frequent metric exports when the field is omitted).
      • trace_id_ratio_based sampler ratio defaults to 1.0 instead of 0.0
        (sample all traces instead of dropping all when the field is omitted).
  • [CONFIGURATION] SDK default component builder libraries and example
    #4367

    • The declarative configuration registry is now empty on construction and
      the default SDK component builders are provided optionally through
      the opentelemetry-cpp::configuration_registry_factory library and
      the opentelemetry::sdk::configuration::RegistryFactory::Create() method.
  • [BUILD] Install an explicit list of ext headers instead of the whole
    directory
    #4327

    • The ext_common component installed include/opentelemetry/ext with a
      *.h glob. It now installs a named list, and these five headers are no
      longer part of the package:
      • opentelemetry/ext/http/client/curl/http_client_curl.h
      • opentelemetry/ext/http/client/curl/http_operation_curl.h
      • opentelemetry/ext/http/client/detail/default_factory.h
      • opentelemetry/ext/http/server/http_server.h
      • opentelemetry/ext/http/server/socket_tools.h
    • Code that included any of them from an installed package will no longer
      compile. A curl client is created through http_client_factory_curl.h,
      which needs only the abstract http_client_factory.h. The two server
      headers are an embedded test server; moving them out of ext is tracked
      in #4332.
  • [CMAKE] Rename cmake options with prefix OTELCPP_
    #4268

    • All CMake build options were renamed with the OTELCPP_ prefix to avoid
      name collisions with user and third-party project variables. For example,
      WITH_OTLP_HTTP, WITH_CONFIGURATION, and WITH_OTLP_RETRY_PREVIEW are
      now OTELCPP_WITH_OTLP_HTTP, OTELCPP_WITH_CONFIGURATION, and
      OTELCPP_WITH_OTLP_RETRY_PREVIEW.
    • BUILD_TESTING becomes OTELCPP_BUILD_TESTING, but is not treated as a
      deprecated alias:
      • When opentelemetry-cpp is the top-level project, BUILD_TESTING sets the
        default value of OTELCPP_BUILD_TESTING.
      • When opentelemetry-cpp is a subproject, the parent project's
        BUILD_TESTING no longer controls opentelemetry-cpp tests, which default
        to OFF.
      • Set OTELCPP_BUILD_TESTING explicitly to enable or disable
        opentelemetry-cpp tests in either top-level or subproject builds.
    • OTELCPP_WITH_BENCHMARK now defaults to the value of
      OTELCPP_BUILD_TESTING instead of always defaulting to ON.
    • The other legacy option names are still accepted but deprecated: a
      deprecation warning is emitted at configure time, and the OTELCPP_ name
      takes precedence when both names are set.
  • [METRICS SDK] Rename Base2 Exponential Histogram Aggregation config field
    #4253

    • The public configuration member max_buckets_ was renamed to max_size_ to
      match the configuration schema. Please adjust SDK configuration accordingly.
  • [CONFIGURATION] Update prometheus config to schema v1.1.0
    #4383

    • The following YAML values for translation_strategy have been replaced
      • UnderscoreEscapingWithSuffixes is replaced by underscore_escaping_with_suffixes
      • UnderscoreEscapingWithoutSuffixes is replaced by underscore_escaping_without_suffixes/development
      • NoUTF8EscapingWithSuffixes is replaced by no_utf8_escaping_with_suffixes/development
      • NoTranslation is replaced by no_translation/development
  • [METRICS SDK] Add an ExemplarFilterType parameter to the MeterContext
    constructor when metrics exemplars are enabled. The parameter has a default
    value, so existing source calls remain valid, but the constructor signature
    and SDK ABI change. Applications using the preview exemplar feature must be
    rebuilt.
    #4328

  • [METRICS SDK] Remove the SystemTimestamp parameter from the preview
    ExemplarReservoir::OfferMeasurement() overloads
    #4267

    • This is an incompatible API and ABI change for custom exemplar reservoirs.
      Implementations and callers must remove the timestamp parameter.
  • [METRICS SDK] Breaking change to the preview metrics exemplar surface: the
    SyncMetricStorage/AsyncMetricStorage constructors now take an
    ExemplarFilterType, and ExemplarData::Create takes the SpanContext
    by value.
    #4267

Important changes

  • [CONFIGURATION] Complete resource detection support in SdkBuilder (#4424)
    #4424

    • Behavior change: SetResource no longer runs OTELResourceDetector and no
      longer injects a default service.name, since neither is part of the
      configuration model. Use the service detector or set the attributes in
      the configuration file instead.
  • [API] Never set a null global provider or propagator
    #4420

    • trace::Provider::SetTracerProvider(),
      metrics::Provider::SetMeterProvider(),
      logs::Provider::SetLoggerProvider(),
      logs::Provider::SetEventLoggerProvider() and
      context::propagation::GlobalTextMapPropagator::SetGlobalPropagator()
      now install the corresponding no-op implementation when passed a null
      pointer, instead of storing the null. The matching getters therefore never
      return nullptr, as already documented, and code that resets a global
      during cleanup no longer risks a nullptr de-ref on a later use.
      Note: this is a correctness fix to an inline API header; the observable
      behavior of these methods changes towards the already documented contract
      (see docs/abi-policy.md).
  • [SDK] Enforce Span Status transition rules (#4547)
    #4547

    • Previously every SetStatus call overwrote the recorded status. It now
      follows the specification, which changes behavior for users in three ways:
      • A call with StatusCode::kUnset is ignored.
      • Once the status is kOk, it is final. So a later call can no longer
        change an explicit kOk.
      • The description is kept only for kError; it is dropped for kOk and
        kUnset.
    • ETWSpan::SetStatus in the ETW exporter follows the same rules.

Deprecations

This release contains deprecations, see file DEPRECATED.md

What's Changed

  • [RELEASE] Bump main branch to 1.29.0-dev by @marcalff in #4259
  • docs: update supported development platforms by @ThomsonTan in #4260
  • Bump github/codeql-action/upload-sarif from 4.37.0 to 4.37.1 by @dependabot[bot] in #4262
  • Bump github/codeql-action/analyze from 4.37.0 to 4.37.1 by @dependabot[bot] in #4263
  • [API] reduce allocation in no span case by @proost in #4254
  • [CONFIGURATION] Programmatic configuration use case tests and fixes by @dbarker in #4243
  • [METRICS SDK] Validate Base2 Exponential Histogram Aggregation config by @RaviTriv in #4253
  • [OTLP EXPORTER] Support setting byte arrays in all attribute collections and reject null keys by @dbarker in #4226
  • [CODE HEALTH] Fix more clang tidy warnings (member initialization) by @dbarker in #4270
  • [SDK] Read span limits from environment variables by @HrMathematiker in #4258
  • Bump actions/checkout from 7.0.0 to 7.0.1 by @dependabot[bot] in #4271
  • Bump github/codeql-action/upload-sarif from 4.37.1 to 4.37.2 by @dependabot[bot] in #4274
  • Bump github/codeql-action/analyze from 4.37.1 to 4.37.3 by @dependabot[bot] in #4276
  • [API] make EnvironmentCarrier spec-compliant (#4190) by @om7057 in #4264
  • [CODE HEALTH] Move metrics storage test fixtures into anonymous namespace by @thc1006 in #4286
  • [CODE HEALTH] Fix remaining misc-override-with-different-visibility warnings by @thc1006 in #4280
  • Bump github/codeql-action/upload-sarif from 4.37.2 to 4.37.3 by @dependabot[bot] in #4278
  • Bump ossf/scorecard-action from 2.4.3 to 2.4.4 by @dependabot[bot] in #4284
  • [CONFIGURATION] Add periodic metric reader builder support to registry by @dbarker in #4277
  • Bump bazel_skylib from 1.9.0 to 1.9.2 by @dependabot[bot] in #4285
  • [CODE HEALTH] Move SDK trace and metrics test helpers into anonymous namespaces by @thc1006 in #4303
  • [CODE HEALTH] Move remaining API test helpers into anonymous namespaces by @thc1006 in #4301
  • Remove file_http_server.h by @owent in #4306
  • [Metrics SDK] Implement configurable cardinality limit by @om7057 in #4188
  • [CI] test examples in bazel builds by @dbarker in #4312
  • [CODE HEALTH] Move SDK common and logs test helpers into anonymous namespaces by @thc1006 in #4302
  • [BUILD] Add missing opentelemetry_proto dependency to otlp_recordable pkg-config by @ThomsonTan in #4316
  • Bump actions/stale from 10.4.0 to 11.0.0 by @dependabot[bot] in #4318
  • [BUILD] Create the configuration_core library for programmatic config by @dbarker in #4311
  • [TEST] Fix use-after-free when an HTTP handler closes the connection by @thc1006 in #4289
  • [BENCHMARK] Add multi-threaded base2 exponential histogram benchmarks by @ThomsonTan in #4319
  • [TEST] Make SocketAddr string parsing safe and reject malformed addresses by @thc1006 in #4292
  • [CI] Run the ext_http component install test on Windows by @thc1006 in #4326
  • [Metrics SDK] Fix histogram views rejected when only aggregation_cardinality_limit is set by @om7057 in #4314
  • [SDK] Implement the ProbabilitySampler by @ayush-that in #4135
  • [BUG] Wait on a completion state in the Elasticsearch exporter by @thc1006 in #4298
  • [BUILD] Fix build break on old protobuf by @marcalff in #4329
  • [OTLP/HTTP] Honor Retry-After header when retrying exports by @DCchoudhury15 in #4186
  • [CONFIGURATION] Decouple config registry and builder headers by @dbarker in #4335
  • [CONFIGURATION] Add the probability sampler to file configuration by @ayush-that in #4334
  • [METRICS SDK] Use std::mutex for SyncMetricStorage record-path lock by @abhinandan-codes in #4245
  • [SDK] Downscale base2 exponential histogram buckets in place by @ThomsonTan in #4324
  • [CODE HEALTH] Move remaining misc-use-internal-linkage sites into anonymous namespaces by @om7057 in #4350
  • [BUILD] Install an explicit list of ext headers instead of the whole tree by @thc1006 in #4327
  • [BUG] Stop reading past a string_view that is not NUL terminated by @thc1006 in #4346
  • Bump github/codeql-action/upload-sarif from 4.37.3 to 4.37.4 by @dependabot[bot] in #4343
  • Bump github/codeql-action/init from 4.37.3 to 4.37.4 by @dependabot[bot] in #4345
  • [CODE HEALTH] Enable clang-tidy modernize-deprecated-headers and fix violations by @om7057 in #4349
  • [CONFIGURATION] Decouple SDK includes from builder interface classes by @dbarker in #4355
  • [OTLP EXPORTERS] add otlp_common target for shared otlp utils by @dbarker in #4333
  • [SDK] Convert SpinLockMutex to std::mutex part 1 by @dbarker in #4323
  • [CONFIGURATION] file configuration - yaml schema 1.1.0 by @marcalff in #4340
  • [CONFIGURATION] Add SDK component builder interfaces to the registry by @dbarker in #4358
  • [CODE HEALTH] Qualify C library calls with std:: after modernize-deprecated-headers by @om7057 in #4356
  • [BUG] Report one outcome when a curl session is cancelled after the response arrives by @thc1006 in #4363
  • Bump github/codeql-action/upload-sarif from 4.37.4 to 4.37.5 by @dependabot[bot] in #4371
  • Bump github/codeql-action/init from 4.37.4 to 4.37.5 by @dependabot[bot] in #4372
  • Bump step-security/harden-runner from 2.20.0 to 2.20.1 by @dependabot[bot] in #4380
  • Bump github/codeql-action/upload-sarif from 4.37.5 to 4.37.6 by @dependabot[bot] in #4378
  • Bump github/codeql-action/init from 4.37.5 to 4.37.6 by @dependabot[bot] in #4379
  • [TEST] Cancel from the IO thread in the curl cancel cases by @thc1006 in #4376
  • [SDK] Percent-decode values from OTEL_RESOURCE_ATTRIBUTES by @om7057 in #4364
  • [SDK] make global log level atomic by @dbarker in #4368
  • [CONFIGURATION] validate and update config files to yaml schema 1.1.0 by @dbarker in #4374
  • [CONFIGURATION] Build composable samplers from file configuration by @ayush-that in #4366
  • [CI] disable gRPC cert_not_found test until the upstream fix is released by @dbarker in #4381
  • [BUG] Stop OTLP ForceFlush returning on the first notification and overrunning its deadline by @thc1006 in #4357
  • [CONFIGURATION] Update prometheus config to schema v1.1.0 by @dbarker in #4383
  • Bump step-security/harden-runner from 2.20.0 to 2.20.1 by @dependabot[bot] in #4386
  • [BUG] Draw the retry jitter from a per thread generator by @thc1006 in #4399
  • [CONFIGURATION] Update ViewSelector to comply with schema v1.1.0 by @dbarker in #4384
  • [CONFIGURATION] SDK default component builder libraries and example by @dbarker in #4367
  • [BUG] Scope the session lock to the snapshot in resetMultiHandle by @thc1006 in #4394
  • [CONFIGURATION] Apply metric view attribute filters by @iamhaseebn in #4385
  • Bump curl from 8.12.0.bcr.1 to 8.21.0 by @dependabot[bot] in #4401
  • [SDK] Fix lost wakeup in BatchSpanProcessor shutdown/force-flush notify by @denizariyan in #4382
  • [BUG] Cancel a curl session without writing to the easy handle by @thc1006 in #4392
  • [SEMANTIC CONVENTIONS] Upgrade to semconv 1.44.0 by @marcalff in #4407
  • [CONFIGURATION] feat: OTEL_METRICS_EXEMPLAR_FILTER env by @proost in #4328
  • [SDK] refactor: exemplar filters by @proost in #4267
  • [CONFIGURATION] Add composable sampler extensions by @shixi-li in #4415
  • [CONFIGURATION] Add builders for the container and process resource detectors by @mateenali66 in #4417
  • [RESOURCE DETECTOR] Add the host resource detector by @mateenali66 in #4418
  • [SDK] Tracer::StartSpan benchmark and optimizations by @dbarker in #4248
  • [API] Never set a null global provider or propagator by @denizariyan in #4420
  • [CONFIGURATION] Add a resource detector extension example by @mateenali66 in #4423
  • [CMAKE] Add support for CMake component deprecation and update the policy by @dbarker in #4272
  • Bump nlohmann_json from 3.12.0.bcr.1 to 3.12.0.bcr.2 by @dependabot[bot] in #4427
  • [CONFIGURATION/BUILD] Resource detector targets and README by @dbarker in #4430
  • [CONFIGURATION] deprecate builder cmake components by @dbarker in #4428
  • [CONFIGURATION] Complete resource detection support in SdkBuilder by @mateenali66 in #4424
  • Bump bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml from 1.4.2 to 1.5.0 by @dependabot[bot] in #4447
  • Bump step-security/harden-runner from 2.20.1 to 2.21.0 by @dependabot[bot] in #4444
  • Bump github/codeql-action/upload-sarif from 4.37.6 to 4.37.7 by @dependabot[bot] in #4443
  • Bump github/codeql-action/init from 4.37.6 to 4.37.7 by @dependabot[bot] in #4446
  • [CONFIGURATION] Set schema default values for all parameters (#4432) by @shashankxrm in #4440
  • [CONFIGURATION] Add a builder for the host resource detector by @Shaurya2k06 in #4455
  • [BUILD] Add more export symbols by @owent in #4461
  • [BUILD] Rename cmake options with prefix OTELCPP_ by @owent in #4268
  • Bump docker/setup-buildx-action from 4.2.0 to 4.3.0 by @dependabot[bot] in #4459
  • Bump step-security/harden-runner from 2.20.0 to 2.21.0 by @dependabot[bot] in #4464
  • Bump actions/checkout from 7.0.0 to 7.0.1 by @dependabot[bot] in #4463
  • [SDK] Range check the rule based predicate double precision by @ayush-that in #4462
  • ci: add shared security scanning workflow by @opentelemetrybot in #4465
  • [RESOURCE DETECTOR] Add the service resource detector and builder by @shashankxrm in #4450
  • Apply percent decoding to resource attributes list by @WyshalZyren in #4460
  • [CONFIGURATION] Support environment variable substitution for attributes by @dbarker in #4474
  • [CONFIGURATION] Provider builder interfaces by @dbarker in #4426
  • [SDK] Fix not reporting failures from MultiSpanProcessor/MultiLogRecordProcessor flush/shutdown by @denizariyan in #4472
  • Bump curl from 8.21.0 to 8.21.0.bcr.1 by @dependabot[bot] in #4481
  • [CONFIGURATION] Update registry factory to return a unique_ptr by @dbarker in #4487
  • [CODE HEALTH] Replace push_back with emplace_back where applicable (#4476) by @sunny-kumar-75 in #4485
  • ci: migrate OSSF Scorecard to shared workflow by @opentelemetrybot in #4478
  • Bump github/codeql-action/init from 4.37.7 to 4.37.8 by @dependabot[bot] in #4497
  • [CONFIGURATION] Apply general attribute_limits to tracer and logger providers by @ayush-singh-0601 in #4468
  • [RESOURCE] Process resource detector reports more attributes by @LevelVoid in #4437
  • [SDK] Replace SpinLockMutex with std::mutex in the metrics library by @dbarker in #4416
  • [SDK] Create instrumentation scope library by @dbarker in #4351
  • [BENCHMARK] sync instrument recording benchmarks by @dbarker in #4470
  • [CONFIGURATION] Internal logging cleanup by @dbarker in #4479
  • [CODE HEALTH] Resolve multiple clang tidy warnings by @dbarker in #4492
  • [CODE HEALTH] Use uint16_t for port numbers in ext/http/server by @marcalff in #4500
  • [CODE HEALTH] Fix cppcoreguidelines-pro-type-const-cast for multi observer metrics. by @marcalff in #4499
  • [CMAKE] Upgrade gRPC to 1.83.1 by @dbarker in #4505
  • [CONFIGURATION] Cleanup build targets and docs by @dbarker in #4486
  • [CMAKE] Upgrade ryml to 0.16.0 by @dbarker in #4507
  • [CMAKE] Upgrade opentelemetry-proto to 1.11.0 by @dbarker in #4508
  • [CODE HEALTH] fix clang-tidy cppcoreguidelines-pro-type-const-cast warnings by @Anish701 in #4482
  • [CMAKE] Upgrade googletest to 1.18.0 and benchmark to 1.9.5 by @dbarker in #4509
  • [CMAKE] add missing pkgconfig dependencies on instrumentation scope by @dbarker in #4504
  • Bump open-telemetry/shared-workflows/.github/workflows/zizmor.yml from 0.10.0 to 0.11.0 by @dependabot[bot] in #4511
  • [EXPORTER] Fix Elasticsearch log exporter aborting on invalid UTF-8 by @om7057 in #4501
  • [TEST] Code cleanup in exporter tests by @marcalff in #4158
  • Bump github/codeql-action/init from 4.37.8 to 4.37.9 by @dependabot[bot] in #4516
  • Bump open-telemetry/shared-workflows/.github/workflows/zizmor.yml from 0.11.0 to 0.12.0 by @dependabot[bot] in #4522
  • [TEST] Fixes BasicCurlHttpTests.RepeatedCallerThreadCancelsAreClean is flaky by @owent in #4524
  • [DOC] Fix and clarify StartSpanOptions documentation by @ThomsonTan in #4526
  • [RESOURCE DETECTOR] Container ID detection from /proc/self/mountinfo by @dbarker in #4525
  • Bump step-security/harden-runner from 2.21.0 to 2.21.1 by @dependabot[bot] in #4529
  • [METRICS SDK] Use wildcard matching for view instrument names by @yigitcan-ozturk in #4520
  • [BUG] Prevent lost condition-variable wakeups during OTLP file, periodic metric, and batch span processor shutdown by @mike-nugent-mongodb in #4365
  • Bump docker/setup-qemu-action from 4.2.0 to 4.3.0 by @dependabot[bot] in #4539
  • [TEST] Time only the quit in ElegantQuitQuick, and bound it where the two outcomes are by @thc1006 in #4488
  • [SDK] Fix lost wakeup in BatchLogProcessor shutdown/force-flush notify by @denizariyan in #4518
  • Bump open-telemetry/shared-workflows/.github/workflows/zizmor.yml from 0.12.0 to 0.13.0 by @dependabot[bot] in #4545
  • Bump open-telemetry/shared-workflows/.github/workflows/scorecard.yml from 0.12.0 to 0.13.0 by @dependabot[bot] in #4543
  • [BUGFIX] Complete an OTLP HTTP request on every state its client can end on by @thc1006 in #4453
  • [CONFIGURATION/TEST] SdkBuilder test separation and expansion by provider type by @dbarker in #4441
  • [CONFIGURATION/BUILD] Break up OTLP builder utils into gRPC and HTTP utils by @dbarker in #4533
  • [DOCS] Update CMake guidance on target linking by @dbarker in #4552
  • [CONFIGURATION] Break the configuration_core dependency on the SDK metrics library by @dbarker in #4554
  • [CONFIGURATION] Break the configuration_core dependency on the SDK logs library by @dbarker in #4553
  • [CONFIGURATION] Break the configuration_core dependency on the SDK trace library by @dbarker in #4555
  • [CONFIGURATION/BUILD] Fix ostream, prometheus, and detector builder library linking by @dbarker in #4551
  • [BUGFIX] Stop a curl request after its gzip step fails by @thc1006 in #4457
  • [DOCS] clarify logger format handling by @SyedAsadRazaDevops in #4149
  • [BUG] Rewind the curl request body with a seek callback by @mateenali66 in #4557
  • [CMAKE] Fix missing version properties on configuration_core by @dbarker in #4559
  • [SDK] Enforce Span Status transition rules by @denizariyan in #4547
  • [SDK] Fix MetricReader post shutdown handling by @denizariyan in #4548
  • [METRICS SDK] last collection of metrics before shutdown by @nikhilbhatia08 in #4550
  • [RELEASE] Release opentelemetry-cpp 1.29.0 by @marcalff in #4560

New Contributors

Full Changelog: v1.28.0...v1.29.0

Don't miss a new opentelemetry-cpp release

NewReleases is sending notifications on new releases.