Skip to content

OTel v0.139.0#4816

Merged
dehaansa merged 18 commits into
mainfrom
otel-139
Nov 14, 2025
Merged

OTel v0.139.0#4816
dehaansa merged 18 commits into
mainfrom
otel-139

Conversation

@dehaansa
Copy link
Copy Markdown
Contributor

@dehaansa dehaansa commented Nov 10, 2025

PR Description

From the upstream changelogs, the following changes are included.


- `pkg/exporterhelper`: Add default values for `sending_queue::batch` configuration. (#13766)
  Setting `sending_queue::batch` to an empty value now results in the same setup as the default batch processor configuration.
- `exporterhelper`: Add new `exporter_queue_batch_send_size` and `exporter_queue_batch_send_size_bytes` metrics, showing the size of telemetry batches from the exporter. (#12894)

- `all`: Add `keep_alives_enabled` option to ServerConfig to control HTTP keep-alives for all components that create an HTTP server. (#13783)
- `all`: Add `keep_alives_enabled` option to ServerConfig to control HTTP keep-alives for all components that create an HTTP server. (#13783)

- `processor/k8sattributes`: Support extracting deployment name purely from the owner reference (#42530)
- `processor/k8sattributesprocessor`: Add support for k8s.cronjob.uid attribute in k8sattributesprocessor (#42557)- `k8sattributesprocessor`: 
- `processor/k8sattributes`: Support extracting labels and annotations from k8s DaemonSets (#37957)
- `processor/k8sattributes`: Support extracting labels and annotations from k8s Jobs (#37957)

- `processor/resourcedetection`: Add the `dt.smartscape.host` resource attribute to data enriched with the Dynatrace detector (#43650)
- `processor/resourcedetection`: Add Openstack Nova resource detector to gather Openstack instance metadata as resource attributes (#39117)
- `processor/resourcedetection`: Add Azure availability zone to resourcedetectionprocessor (#40983)
- `resourcedetectionprocessor`: Added Oracle Cloud resource detection support to resourcedetectionprocessor, enabling automatic population of Oracle Cloud-specific resource attributes. (#35091)
- `processor/resourcedetection`: Add support for akamai cloud in resourcedetectionprocessor (#42543)
- `processor/resourcedetectionprocessor`: Add support for Scaleway host image attributes in the resourcedetectionprocessor (#42682)
- `processor/resourcedetectionprocessor`: Add support for Vultr cloud provider in the resourcedetectionprocessor (#42569)
- `processor/resourcedetection`: Add support for DigitalOcean in resourcedetectionprocessor (#42803)
- `processor/resourcedetection`: Add support for upcloud in resourcedetectionprocessor (#42801)
- `processor/resourcedetectionprocessor`: Add support for Scaleway cloud provider in the resourcedetectionprocessor (#42664)
- `processor/resourcedetection`: Add support for hetzner cloud in resourcedetectionprocessor (#42476)

- `exporter/kafka`: Add support for partitioning log records by trace ID (#39146)
- `exporter/kafkaexporter`: Use franz-go client for Kafka exporter as default, promoting the exporter.kafkaexporter.UseFranzGo feature gate to Beta. (#42156)
- `exporter/kafka`: Add allow_auto_topic_creation producer option to kafka exporter and client (#42468)
  
- `kafkareceiver`: Add `max_partition_fetch_size` configuration option to kafkareceiver (#43097)
- `receiver/kafka`: Add support for disabling KIP-320 (truncation detection via leader epoch) for Franz-Go (#42226)
- `receiver/kafkareceiver`: Use franz-go client for Kafka receiver as default, promoting the receiver.kafkareceiver.UseFranzGo feature gate to Beta. (#42155)
- `kafkareceiver`: Add `rack_id` configuration option to enable rack-aware replica selection (#42313)
  When configured and brokers support rack-aware replica selection, the client will prefer fetching from the closest replica, potentially reducing latency and improving performance.
- `kafka`: Fix support for protocol_version in franz-go client (#42795)

- `exporter/awss3`: Support compression with the sumo_ic marshaller (#43574)
- `exporter/awss3`: Add S3PartitionTimezone config value to be able to change the timezone used for time-based partitioning (#42319)
- `exporter/awss3exporter`: adds configuration field 's3_base_prefix' to be able to set a base path for all S3 file uploads (#42661)

- servicegraph - exponential_histogram_max_size

Which issue(s) this PR fixes

Notes to the Reviewer

PR Checklist

  • CHANGELOG.md updated
  • Documentation added
  • Tests updated
  • Config converters updated

@dehaansa dehaansa requested review from a team and clayton-cornell as code owners November 10, 2025 20:28
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 10, 2025

💻 Deploy preview deleted (OTel v0.139.0).

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 10, 2025

🔍 Dependency Review

Below is a review of the Go module dependency changes in this PR, focusing on required code updates to adopt the new versions. Each section includes relevant upstream change references and the concrete code changes (shown as diffs) that this PR already implements or that you should make to maintain behavior.

Note: This PR updates multiple OpenTelemetry Collector core and contrib modules across several minor releases (0.134 → 0.139), which include breaking changes. The review below exhaustively covers those changes and other impactful upgrades. Patch/maintenance bumps (AWS SDK, cobra, xmlquery, etc.) are listed as Safe unless there’s an API impact.

OpenTelemetry Collector core and contrib 0.134.x → 0.139.x

Status: ❌ Changes Needed

This is the main, breaking set of upgrades affecting a wide surface area (telemetry settings, HTTP/GRPC headers types, queue defaults, server keep-alives, component settings, etc.). The PR already includes the required code changes.

Key upstream references:

Notable breaking/behavioral changes between 0.134 and 0.139, and code updates required:

  • configopaque.Headers changed from map to MapList

    • HTTP/GRPC client configs now use configopaque.MapList to preserve order and allow duplicates. Code that set or iterated headers as map[string]configopaque.String must use configopaque.MapList with .Set() and .Iter().
    • Evidence: Core/config change in confighttp/configgrpc.
    • Code updates:
      - opaqueHeaders := make(map[string]configopaque.String)
      - for headerName, headerVal := range args.Headers {
      -   opaqueHeaders[headerName] = configopaque.String(headerVal)
      - }
      + opaqueHeaders := configopaque.MapList{}
      + for headerName, headerVal := range args.Headers {
      +   opaqueHeaders.Set(headerName, configopaque.String(headerVal))
      + }
      Files:
      • internal/component/otelcol/config_grpc.go
      • internal/component/otelcol/config_http.go
      • internal/component/otelcol/exporter/faro/faro_test.go
      • internal/component/otelcol/exporter/loadbalancing/loadbalancing.go
      • internal/component/otelcol/exporter/loadbalancing/loadbalancing_test.go
      • internal/component/otelcol/extension/jaeger_remote_sampling/... (remotesource)
      • internal/component/otelcol/extension/jaeger_remote_sampling/... (tests)
  • Queue and batch defaults; NewDefaultQueueConfig and batch defaulting

    • Exporterhelper introduces defaults via exporterhelper.NewDefaultQueueConfig() and default batch settings (instead of requiring always-literal construction).
    • Evidence: exporterhelper API changes across 0.136+.
    • Code updates:
      - q := &otelexporterhelper.QueueBatchConfig{
      -   Enabled:         args.Enabled,
      -   NumConsumers:    args.NumConsumers,
      -   QueueSize:       args.QueueSize,
      -   BlockOnOverflow: args.BlockOnOverflow,
      -   Sizer:           *sizer,
      -   WaitForResult:   args.WaitForResult,
      -   Batch:           batch,
      - }
      + q := otelexporterhelper.NewDefaultQueueConfig()
      + q.Enabled = args.Enabled
      + q.NumConsumers = args.NumConsumers
      + q.QueueSize = args.QueueSize
      + q.BlockOnOverflow = args.BlockOnOverflow
      + q.Sizer = *sizer
      + q.WaitForResult = args.WaitForResult
      + q.Batch = batch
      - return q, nil
      + return &q, nil
      And default batch now provided:
      - if args == nil {
      -   return configoptional.None[otelexporterhelper.BatchConfig](), nil
      - }
      + if args == nil {
      +   return defaultBatchConfig, nil
      + }
      Files:
      • internal/component/otelcol/config_queue.go (+tests updated expectations)
      • exporters/tests updated to expect default batch where previously none
  • Server Keep-Alive configuration

    • HTTP server configs now include KeepAlivesEnabled (default true) across receivers/extensions, exposing HTTP keep-alives control.
    • Evidence: confighttp.ServerConfig changes.
    • Code updates:
      type HTTPServerArguments struct {
        ...
      + KeepAlivesEnabled *bool `alloy:"keep_alives_enabled,attr,optional"`
      }
      ...
      + // Default true boolean
      + keepAliveEnabled := true
      + if args.KeepAlivesEnabled != nil {
      +   keepAliveEnabled = *args.KeepAlivesEnabled
      + }
      ...
      return configoptional.Some(otelconfighttp.ServerConfig{
        ...
      + KeepAlivesEnabled:     keepAliveEnabled,
        ...
      })
      Files:
      • internal/component/otelcol/config_http.go
      • Receivers docs updated: datadog, faro, influxdb, jaeger, otlp, splunkhec, zipkin (docs)
  • Component settings BuildInfo and TelemetrySettings.Resource

    • Components should now populate TelemetrySettings.Resource for telemetry self-instrumentation.
    • This PR adds otelcol/util helper to create a BuildInfo and resource via otelconftelemetry factory and assigns it to Settings.
    • Evidence: service/telemetry changes and collector best practices.
    • Code updates:
      - BuildInfo: otelcomponent.BuildInfo{ ... },
      + BuildInfo: otelcolutil.GetBuildInfo(),
      + resource, err := otelcolutil.GetTelemetrySettingsResource()
      + if err != nil { return err }
      + settings.TelemetrySettings.Resource = resource
      Files:
      • internal/component/otelcol/util/telemetry_settings.go (new)
      • Applied in: auth, connector, exporter, extension, processor, receiver, prometheus receiver.
  • Scheduler: startComponents returns (started, error); error handling tightened

    • startComponents now returns an error along with started components; callers should log error and proceed (it’s possible some components start, some fail).
    • Code updates:
      - cs.schedComponents = cs.startComponents(ctx, h, cc...)
      + cs.schedComponents, err = cs.startComponents(ctx, h, cc...)
      + if err != nil {
      +   level.Error(cs.log).Log("msg", "failed to start some scheduled components", "err", err)
      + }
      Files:
      • internal/component/otelcol/internal/scheduler/scheduler.go
  • Load balancing exporter: pin to v0.138.0 due to upstream bug

  • Kafka exporter enhancements

    • New fields: allow_auto_topic_creation (producer), include_metadata_keys, partition_logs_by_resource_attributes, partition_logs_by_trace_id; topic_from_metadata_key in signal-specific blocks; client_id default changed to "otel-collector".
    • Docs updated accordingly; code maps new arguments and defaults.
    • Files:
      • internal/component/otelcol/exporter/kafka/kafka.go (+tests, converter, docs)
  • Kafka receiver enhancements

    • New fields: max_partition_fetch_size, rack_id, use_leader_epoch with defaults (including franz-go support). Code maps to upstream configs.
    • Files:
      • internal/component/otelcol/receiver/kafka/kafka.go (+tests, converter, docs)
  • S3 exporter enhancements

    • New S3 uploader args: s3_base_prefix, s3_partition_timezone; dynamic resource_attrs_to_s3 now supports s3_bucket override.
    • Files:
      • internal/component/otelcol/exporter/awss3/awss3.go (+tests, docs)
  • ServiceGraph connector

    • New exponential_histogram_max_size option surfaced.
    • Files:
      • internal/component/otelcol/connector/servicegraph/servicegraph.go (+tests, docs)
  • OTLP service telemetry conversion now uses otelconftelemetry (factory)

    • Minor signature changes to accept pointer; consistent with new telemetry factory.
    • Files:
      • internal/converter/internal/otelcolconvert/converter_service_telemetry.go
  • Headers in tests and conversions updated to MapList across multiple components (faroeporter/loadbalancing exporter/splunkhec exporter)

  • Component test controller run behavior

    • Ensures WaitRunning unblocks even when a component fails early—adds a small grace period to signal running or capture early error.
    • Files:
      • internal/runtime/componenttest/componenttest.go

Additional doc changes included in this PR:

  • Batch defaults now documented as having defaults (not unused by default).
  • HTTP keep-alives documented.
  • Receiver/exporter docs updated with new options for Kafka and S3.

All of the above changes are necessary to compile and preserve behavior across 0.134 → 0.139.

Note: The PR already implements all of these required changes. If you reuse these components elsewhere, apply the same patterns: adopt configopaque.MapList for headers, use NewDefaultQueueConfig, supply TelemetrySettings.Resource, and handle new server/receiver/exporter fields.

OpenTelemetry eBPF stack (go.opentelemetry.io/obi and go.opentelemetry.io/ebpf-profiler replacements)

Status: ❌ Changes Needed

The PR replaces:

  • go.opentelemetry.io/obi => github.com/grafana/opentelemetry-ebpf-instrumentation v1.3.7
  • go.opentelemetry.io/ebpf-profiler => github.com/grafana/opentelemetry-ebpf-profiler v0.0.202546-...

These bumps bring API changes in the eBPF profiler/instrumentation APIs:

  • The file observer interface changed: FileObserverExecutableReporter.
  • Native symbol APIs consolidated under pyroscope/symb/irsymcache; type names changed (SourceInfo, Resolver).
  • SymbolizeNativeFrame(...) now accepts raw address and libpf FileID (not host.Frame).

Code updates in this PR:

- cfg.FileObserver = nfs
+ cfg.ExecutableReporter = nfs

- if c.cfg.FileObserver != nil {
-   c.cfg.FileObserver.Cleanup()
- }
+ if c.cfg.ExecutableReporter != nil {
+   if nfs, ok := c.cfg.ExecutableReporter.(*irsymcache.Resolver); ok {
+     nfs.Cleanup()
+   }
+ }

and in reporter:

- ExtraNativeSymbolResolver samples.NativeSymbolResolver
+ ExtraNativeSymbolResolver irsymcache.NativeSymbolResolver

- hostFrame := host.Frame{...}
- irsymcache.SymbolizeNativeFrame(p.cfg.ExtraNativeSymbolResolver, mappingFile.FileName, hostFrame, func(si samples.SourceInfo) {
+ irsymcache.SymbolizeNativeFrame(p.cfg.ExtraNativeSymbolResolver, mappingFile.FileName, fr.AddressOrLineno, mappingFile.FileID, func(si irsymcache.SourceInfo) {

Evidence:

  • Code changes in internal/component/pyroscope/ebpf and pyroscope reporter tests.
  • These changes are required to compile and function with the new eBPF profiler versions.

No further action needed if you keep the pinned replacements as in this PR.

OpenTelemetry Prometheus exporter v0.58.0 → v0.60.0

Status: ⚠️ Needs Review

Change:

  • WithoutUnits() is deprecated; upstream promotes translation strategies instead (e.g., WithMetricRenamer, base units, etc.).
  • This PR keeps WithoutUnits() and adds a staticcheck suppression comment to avoid warnings, keeping behavior stable.

Code:

- return otelprom.New(
-   otelprom.WithRegisterer(reg),
-   otelprom.WithoutUnits(),
+ return otelprom.New(
+   otelprom.WithRegisterer(reg),
+   otelprom.WithoutUnits(), //nolint:staticcheck // WithoutUnits is deprecated but none of the translation strategies seem correct

Action:

  • Verify that retaining the “no units” behavior aligns with your metric compatibility requirements. Consider plan to adopt a recommended translation strategy in a future PR.

github.com/leodido/go-syslog/v4 v4.2.0 → v4.3.0

Status: ❌ Changes Needed

Behavior change:

  • Error messages for excessive message length changed wording.

Test update required (already done in PR):

- require.EqualError(t, results[0].Error, "message too long to parse. was size 8198, max length 8192")
+ require.EqualError(t, results[0].Error, "message length (8198) exceeds maximum length (8192)")

Evidence:

  • Test change in internal/component/loki/source/syslog/internal/syslogtarget/syslogparser/syslogparser_test.go

github.com/DataDog/go-sqllexer v0.1.6 → v0.1.9

Status: ❌ Changes Needed

Behavior change:

  • MySQL identifier quoting handling tightened; double-quoted identifier can now error while backticks are the correct MySQL quoting.

Test update required (already done in PR):

- _, err := ContainsReservedKeywords("SELECT \"foo", ExplainReservedWordDenyList, sqllexer.DBMSMySQL)
+ // TODO - consider if lexer should still error on "foo, see https://github.com/DataDog/go-sqllexer/pull/72
+ _, err := ContainsReservedKeywords("SELECT `foo", ExplainReservedWordDenyList, sqllexer.DBMSMySQL)

Evidence:

  • Test update and related comment in internal/component/database_observability/lexer_test.go
  • Upstream PRs around MySQL quoting handling.

Kafka libraries

  • github.com/IBM/sarama v1.46.1 → v1.46.3
  • github.com/twmb/franz-go v1.19.5 → v1.20.2 and kmsg v1.11.2 → v1.12.0
    Status: ⚠️ Needs Review

Changes surfaced in this PR (and required with updated clients):

  • Receiver: support new franz-go features (max_partition_fetch_size, rack_id, use_leader_epoch).
  • Exporter (Kafka): producer adds allow_auto_topic_creation.
  • Exporter (Kafka): log partitioning options and metadata propagation (include_metadata_keys, partition_logs_by_*, topic_from_metadata_key), default client_id changed to otel-collector.
  • Docs updated accordingly.

No additional code changes required beyond what the PR includes; ensure compatibility with your brokers if toggling use_leader_epoch (note the Event Hubs caveat in docs). Defaults maintain previous behavior unless you enable new settings.

OpenTelemetry collector client/core versions v1.44 → v1.45 (pinned submodules at 0.139.x)

Status: ❌ Changes Needed

These go hand-in-hand with the 0.139.x contrib changes above. The code adjustments already made in this PR (headers MapList, telemetry settings resource, queue defaults, server keep-alives, etc.) are required for these bumps to compile and preserve behavior.

No further changes required.

Other dependency bumps (selected)

  • cloud.google.com/go/pubsub v1.50.0 → v1.50.1 (patch) – ✅ Safe
  • github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.53.0 → v0.54.0 – ✅ Safe (no breaking API used)
  • github.com/grafana/beyla/v2 v2.7.4 → v2.7.6 – ⚠️ Needs Review (internal eBPF improvements, no API changes observed here; eBPF stack handled above)
  • github.com/klauspost/compress v1.18.0 → v1.18.1 – ✅ Safe
  • github.com/spf13/cobra v1.9.1 → v1.10.1 – ✅ Safe
  • github.com/antchfx/xmlquery v1.4.4 → v1.5.0 – ✅ Safe
  • hetznercloud/hcloud-go v2.25.1 → v2.28.0 – ✅ Safe
  • itchyny/timefmt-go v0.1.6 → v0.1.7 – ✅ Safe
  • Numerous AWS SDK v2 service/client patches – ✅ Safe (no code changes needed here).

Notes

If you maintain forks or external modules consuming these APIs, apply the same patterns (MapList for headers, default queue config creation, new server fields, etc.) when upgrading to OpenTelemetry 0.139.x to avoid breakages.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR upgrades OpenTelemetry Collector to version 0.139.0, bringing various improvements including new cloud provider detectors, Kafka enhancements, S3 exporter features, and telemetry configuration updates.

Key Changes:

  • Adds support for 10 new cloud provider resource detectors (Akamai, DigitalOcean, Hetzner, Nova, OracleCloud, Scaleway, UpCloud, Vultr, etc.)
  • Enhances Kafka receiver with rack-aware replica selection and partition fetch size controls
  • Updates S3 exporter with timezone and base prefix configuration options
  • Introduces HTTP keep-alives configuration support across HTTP receivers
  • Refactors telemetry settings resource handling with caching mechanism
  • Updates queue batch configuration defaults

Reviewed Changes

Copilot reviewed 72 out of 73 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
internal/component/otelcol/util/telemetry_settings.go New utility for centralized telemetry resource management with caching
internal/component/otelcol/processor/resourcedetection/ Adds 10 new cloud provider detector configurations
internal/component/otelcol/receiver/kafka/kafka.go Adds rack ID and leader epoch configuration options
internal/component/otelcol/exporter/kafka/kafka.go Adds log partitioning and metadata key options
internal/component/otelcol/exporter/awss3/awss3.go Adds S3 base prefix and timezone configuration
internal/component/otelcol/config_http.go Adds HTTP keep-alives configuration support
internal/component/otelcol/config_queue.go Updates queue batch configuration with new defaults
internal/converter/internal/otelcolconvert/converter_otlpexporter.go Updates header handling for new MapList type
internal/runtime/componenttest/componenttest.go Improves component startup timing with timeout mechanism
docs/sources/reference/components/otelcol/ Updates documentation for new features

Comment thread internal/component/otelcol/util/telemetry_settings.go
Comment thread internal/component/otelcol/config_queue.go Outdated
Comment thread internal/component/otelcol/config_queue.go Outdated
dehaansa and others added 8 commits November 12, 2025 09:41
…le reporters (#4827)

This change addresses the container ID handling and symbol resolution in the Pyroscope eBPF profiler by:

- Replacing FileObserver with ExecutableReporter in the configuration to better reflect its purpose and enable proper cleanup with type assertions
- Moving container ID to the proper layer in the event reporting flow by passing it as a parameter to createProfile instead of storing it in ExtraMeta
- Simplifying the type system in tests by using upstream types (libpf.FileID and irsymcache.SourceInfo) instead of wrapper types

These changes improve type safety and align the code with the OpenTelemetry eBPF profiler v0.139.0 API.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
@dehaansa
Copy link
Copy Markdown
Contributor Author

Failing test is from data race fixed #4829

@dehaansa
Copy link
Copy Markdown
Contributor Author

Noticed that OTEL_VERSION hadn't been updated for 1.11, made a PR to update the release branch. #4833

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 89 out of 90 changed files in this pull request and generated no new comments.

Copy link
Copy Markdown
Contributor

@jharvey10 jharvey10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did some manual, non-exhaustive comparisons through the changes in the PR description, the AI-generated dep review, and the code searching for anomalies. I didn't find anything that stuck out to me.

@dehaansa dehaansa enabled auto-merge (squash) November 14, 2025 15:29
@dehaansa dehaansa merged commit 1254f6d into main Nov 14, 2025
47 of 48 checks passed
@dehaansa dehaansa deleted the otel-139 branch November 14, 2025 16:09
@bobrik
Copy link
Copy Markdown
Contributor

bobrik commented Nov 22, 2025

After this merge the following warnings started appearing:

WARN[0005] Invalid metric id 101, skipping
WARN[0005] Invalid metric id 102, skipping
WARN[0005] Invalid metric id 272, skipping
WARN[0005] Invalid metric id 273, skipping
WARN[0005] Invalid metric id 274, skipping
WARN[0005] Invalid metric id 185, skipping
WARN[0005] Invalid metric id 158, skipping
WARN[0005] Invalid metric id 220, skipping
WARN[0005] Invalid metric id 148, skipping
WARN[0005] Invalid metric id 277, skipping
WARN[0005] Invalid metric id 184, skipping
WARN[0005] Invalid metric id 186, skipping
WARN[0005] Invalid metric id 188, skipping
WARN[0005] Invalid metric id 183, skipping
WARN[0005] Invalid metric id 150, skipping
WARN[0005] Invalid metric id 133, skipping
WARN[0005] Invalid metric id 147, skipping
WARN[0005] Invalid metric id 187, skipping
WARN[0005] Invalid metric id 189, skipping
WARN[0005] Invalid metric id 190, skipping

This is where they come from:

This call in the parent commit isn't happening anymore to populate the variable:

0  0x000000000a3e028e in go.opentelemetry.io/ebpf-profiler/metrics.GetDefinitions
   at /home/ivan/go/pkg/mod/github.com/grafana/opentelemetry-ebpf-profiler@v0.0.202537-0.20250916114748-f2ff2fc6048c/metrics/metrics.go:208
1  0x000000000a3df485 in go.opentelemetry.io/ebpf-profiler/metrics.init.0
   at /home/ivan/go/pkg/mod/github.com/grafana/opentelemetry-ebpf-profiler@v0.0.202537-0.20250916114748-f2ff2fc6048c/metrics/metrics.go:54
2  0x000000000045ef95 in runtime.doInit1
   at /opt/go/src/runtime/proc.go:7670
3  0x000000000044fc70 in runtime.doInit
   at /opt/go/src/runtime/proc.go:7637
4  0x000000000044fc70 in runtime.main
   at /opt/go/src/runtime/proc.go:256
5  0x000000000048fe01 in runtime.goexit
   at /opt/go/src/runtime/asm_amd64.s:1693

@bobrik
Copy link
Copy Markdown
Contributor

bobrik commented Nov 23, 2025

It looks like metrics used to be initialized implicitly by init(), but now one has to call Start() explicitly:

$ git diff f2ff2fc6048c..a00a0ef2a84c -- metrics/metrics.go
diff --git a/metrics/metrics.go b/metrics/metrics.go
index a0a9beb..752847f 100644
--- a/metrics/metrics.go
+++ b/metrics/metrics.go
@@ -14,10 +14,7 @@ import (

        log "github.com/sirupsen/logrus"

-       "go.opentelemetry.io/otel"
        "go.opentelemetry.io/otel/metric"
-
-       "go.opentelemetry.io/ebpf-profiler/vc"
 )

 var (
@@ -44,13 +41,11 @@ var (
        metricTypes map[MetricID]MetricType

        // OTel metric instrumentation
-       meter = otel.Meter("go.opentelemetry.io/ebpf-profiler",
-               metric.WithInstrumentationVersion(vc.Version()))
        counters = map[MetricID]metric.Int64Counter{}
        gauges   = map[MetricID]metric.Int64Gauge{}
 )

-func init() {
+func Start(meter metric.Meter) {
        defs := GetDefinitions()
        metricTypes = make(map[MetricID]MetricType, len(defs))
        for _, md := range defs {

@dehaansa
Copy link
Copy Markdown
Contributor Author

@bobrik thanks for reporting this! We're looking into the issue.

dehaansa added a commit to madhub/alloy that referenced this pull request Dec 10, 2025
* Squashed OTel v0.139.0

* converters

* update ebpfs

* appease copilot

* pyroscope ebpf compatibility

* Update ebpf fork with otel v0.139.0

* Refactor Pyroscope eBPF to properly handle container IDs and executable reporters (grafana#4827)

This change addresses the container ID handling and symbol resolution in the Pyroscope eBPF profiler by:

- Replacing FileObserver with ExecutableReporter in the configuration to better reflect its purpose and enable proper cleanup with type assertions
- Moving container ID to the proper layer in the event reporting flow by passing it as a parameter to createProfile instead of storing it in ExtraMeta
- Simplifying the type system in tests by using upstream types (libpf.FileID and irsymcache.SourceInfo) instead of wrapper types

These changes improve type safety and align the code with the OpenTelemetry eBPF profiler v0.139.0 API.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>

* Update go.mod

* Fix jaegerremotesampling test

* fix a few other tests

* Appease linter

* linting and tests

* downgrade loadbalancing exporter

* Changelog entry

* Update OTEL_VERSION

---------

Co-authored-by: Christian Simon <simon@swine.de>
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Dec 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants