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

otlp grpc trace and headers_setter #27796

Closed
elysiumHL opened this issue Oct 17, 2023 · 2 comments
Closed

otlp grpc trace and headers_setter #27796

elysiumHL opened this issue Oct 17, 2023 · 2 comments

Comments

@elysiumHL
Copy link

elysiumHL commented Oct 17, 2023

Component(s)

extension/headerssetter

Describe the issue you're reporting

  1. I found that if javaagent uses grpc trace endpoint, then the header_setter extension of otel-collector cannot handle the headers, X-Scope-OrgID is not set correctly. I'm not sure if this is normal
  2. The javaagent and otel-collector configurations are as follows.
  • Here is the configuration of javaagent
export OTEL_SERVICE_NAME="your-service-name"
export OTEL_EXPORTER_OTLP_HEADERS="tenant_id=abc"
export OTEL_EXPORTER_OTLP_ENDPOINT="http://otelcol:4317"
export JAVA_TOOL_OPTIONS="-javaagent:/path/to/opentelemetry-javaagent.jar"
java -jar myapp.jar
  • Here is the configuration of the otell-Collector
extensions:
  memory_ballast:
    size_mib: 1024
  headers_setter:
    headers:
      - action: upsert
        key: X-Scope-OrgID
        from_context: tenant_id

receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317
        include_metadata: true
      http:
        endpoint: 0.0.0.0:4318
        include_metadata: true

processors:
  memory_limiter:
    limit_mib: 1536 
    spike_limit_mib: 512
    check_interval: 5s

exporters:
  debug:
    verbosity: detailed
  otlp/tempo:
    endpoint: tempo:4317
    tls:
      insecure: true
    auth:
      authenticator: headers_setter

service:
  extensions: [memory_ballast, headers_setter]
  pipelines:
    traces:
      receivers: [otlp]
      processors: [memory_limiter]
      exporters: [debug, otlp/tempo]
@elysiumHL elysiumHL added the needs triage New item requiring triage label Oct 17, 2023
@github-actions
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@jpkrohling
Copy link
Member

I'm curious as to why this was closed. Did you find an solution that works for your situation?

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

No branches or pull requests

2 participants