otel-agent: support Deployment kind, routing directly to existing otel-collector#863
Merged
Conversation
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
3a46505 to
fbd3a51
Compare
Base automatically changed from
05-07-fix_otel_agent_is_not_picking_up_traces
to
main
May 8, 2026 01:52
Adds `openTelemetry.agent.kind` value (default: `DaemonSet`) to allow customers who cannot run DaemonSets in their clusters to deploy the otel-agent as a Deployment instead. When `kind: Deployment`: - A Deployment is created instead of the DaemonSet - A ClusterIP Service (`otel-agent`) is created to front the agent pods - Application pods send traces to `http://otel-agent:4317` (the Service) rather than to the node's host IP via hostPort `openTelemetry.agent.replicas` can be set to control the replica count when running as a Deployment (defaults to 1). https://claude.ai/code/session_01K2AnXLduzruntPtUsC7xiA
When openTelemetry.agent.kind=Deployment, skip the otel-agent DaemonSet and point OTEL_EXPORTER_OTLP_ENDPOINT directly at the existing otel-collector Deployment (http://otel-collector:4317), which already has the OTLP gRPC receiver enabled. Removes the unnecessary otel-agent Deployment + ClusterIP Service that were added in the previous commit. https://claude.ai/code/session_01K2AnXLduzruntPtUsC7xiA
fbd3a51 to
09a44c2
Compare
marcleblanc2
approved these changes
May 8, 2026
Contributor
|
Excellent work, thank you so much! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

ref https://github.com/sourcegraph/sourcegraph/pull/12299
ref https://sourcegraph.slack.com/archives/C05MW2TMYAV/p1778179723106999
Summary
Added
openTelemetry.agent.kindvalue ("DaemonSet"|"Deployment", default"DaemonSet") for environments where DaemonSets are restricted (e.g. some customer limitation)When
kind: "Deployment", the otel-agent DaemonSet is not created and application pods send traces directly to the existingotel-collectorDeployment viahttp://otel-collector:4317(the pre-existing ClusterIP service with gRPC OTLP on port 4317)Test plan
kind cluster with below override. tested and it worked
there's no more
otel-agentds:can view the trace in jager:
Generated by Claude Code