Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helm "opentelemetry-operator" - cannot enable auto instrumentation for Golang #1506

Open
diegocejasprieto opened this issue Jan 22, 2025 · 1 comment

Comments

@diegocejasprieto
Copy link

diegocejasprieto commented Jan 22, 2025

That's simple: I cannot enable auto instrumentation for Golang using Opentelemetry Operator deployed by Helm. I get this error message

invalid argument "autoinstrumentation.go" for "--feature-gates" flag: no such feature gate "autoinstrumentation.go". valid gates: [operator.collector.default.config operator.collector.targetallocatorcr operator.golang.flags operator.observability.prometheus operator.sidecarcontainers.native operator.targetallocator.fallbackstrategy operator.targetallocator.mtls]

This is an extract of my operator configuration declared in values.yaml:

manager:
image:
repository: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator
tag: ""
collectorImage:
repository: otel/opentelemetry-collector-k8s
tag: 0.116.1
opampBridgeImage:
repository: ""
tag: ""
targetAllocatorImage:
repository: ""
tag: ""
autoInstrumentationImage:
java:
repository: ""
tag: ""
nodejs:
repository: ""
tag: ""
python:
repository: ""
tag: ""
dotnet:
repository: ""
tag: ""
apacheHttpd:
repository: ""
tag: ""
go:
repository: ""
tag: ""
featureGates: "autoinstrumentation.go"
featureGatesMap: {}

Note: I have already deployed a custom resource of instrumentation which works properly, it's just the operator that refuses to auto instrument it with Golang

@diegocejasprieto
Copy link
Author

diegocejasprieto commented Jan 22, 2025

UPDATE: I just found a way to enable it by passing this argument in the "extraArgs" section of the manager. I don't know if this is the proper way to do it, but I couldn't find any other way to do so (this procedure also works when you deploy the Opentelemetry collector manually)

manager:
    extraArgs: [--enable-go-instrumentation]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant