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

Simplify Instrumentation exporter endpoint configuration #3658

Open
pavolloffay opened this issue Jan 24, 2025 · 2 comments
Open

Simplify Instrumentation exporter endpoint configuration #3658

pavolloffay opened this issue Jan 24, 2025 · 2 comments
Labels
area:auto-instrumentation Issues for auto-instrumentation enhancement New feature or request needs triage

Comments

@pavolloffay
Copy link
Member

Component(s)

auto-instrumentation

Is your feature request related to a problem? Please describe.

The instrumentation CR exporter endpoint

spec:
  exporter:
    endpoint: http://otel-collector:4317

can take both gRPC (4317) and HTTP (4318) OTLP endpoints. Some instrumentation implementations default to grpc (java 1.x, node). Which is confusing because a single instrumentation CR can be used for all instrumentation at one and therefore users have to override the endpoint via an env variable:

kubectl apply -f - <<EOF
apiVersion: opentelemetry.io/v1alpha1
kind: Instrumentation
metadata:
  name: my-instrumentation
spec:
  exporter:
    endpoint: http://otel-collector:4317
  propagators:
    - tracecontext
    - baggage
    - b3
  sampler:
    type: parentbased_traceidratio
    argument: "0.25"
  python:
    env:
      # Required if endpoint is set to 4317.
      # Python autoinstrumentation uses http/proto by default
      # so data must be sent to 4318 instead of 4317.
      - name: OTEL_EXPORTER_OTLP_ENDPOINT
        value: http://otel-collector:4318
  dotnet:
    env:
      # Required if endpoint is set to 4317.
      # Dotnet autoinstrumentation uses http/proto by default
      # See https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/888e2cd216c77d12e56b54ee91dafbc4e7452a52/docs/config.md#otlp
      - name: OTEL_EXPORTER_OTLP_ENDPOINT
        value: http://otel-collector:4318
  go:
    env:
      # Required if endpoint is set to 4317.
      # Go autoinstrumentation uses http/proto by default
      # so data must be sent to 4318 instead of 4317.
      - name: OTEL_EXPORTER_OTLP_ENDPOINT
        value: http://otel-collector:4318
EOF

Describe the solution you'd like

Make the exporter endpoint protocol aware e.g.

spec:
  exporter:
    // deprecated
    endpoint:
    otlpHTTP: http://otel-collector:4318
    otlpGRPC: http://otel-collector:4317

Describe alternatives you've considered

No response

Additional context

No response

@pavolloffay pavolloffay added enhancement New feature or request needs triage area:auto-instrumentation Issues for auto-instrumentation labels Jan 24, 2025
@nikhil-thomas
Copy link

i shall work on this. 🧑‍💻

@nikhil-thomas
Copy link

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:auto-instrumentation Issues for auto-instrumentation enhancement New feature or request needs triage
Projects
None yet
Development

No branches or pull requests

2 participants