Skip to content
This repository was archived by the owner on Jul 28, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Main (unreleased)

- [BUGFIX] Do not immediately cancel context when creating a new trace
processor. This was preventing scrape_configs in traces from
functioning. (@lheinlen)

- [FEATURE] Operator: The Grafana Agent Operator can now generate a Kubelet
service to allow a ServiceMonitor to collect Kubelet and cAdvisor metrics.
This requires passing a `--kubelet-service` flag to the Operator in
Expand Down
3 changes: 2 additions & 1 deletion pkg/traces/promsdprocessor/prom_sd_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ type promServiceDiscoProcessor struct {

func newTraceProcessor(nextConsumer consumer.Traces, operationType string, scrapeConfigs []*config.ScrapeConfig) (component.TracesProcessor, error) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()

logger := log.With(util.Logger, "component", "traces service disco")
mgr := discovery.NewManager(ctx, logger, discovery.Name("traces service disco"))
Expand All @@ -54,6 +53,7 @@ func newTraceProcessor(nextConsumer consumer.Traces, operationType string, scrap

err := mgr.ApplyConfig(managerConfig)
if err != nil {
cancel()
return nil, err
}

Expand All @@ -62,6 +62,7 @@ func newTraceProcessor(nextConsumer consumer.Traces, operationType string, scrap
case "": // Use Upsert by default
operationType = OperationTypeUpsert
default:
cancel()
return nil, fmt.Errorf("unknown operation type %s", operationType)
}

Expand Down