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

processor/routing ignores context attributes statements #22003

Closed
FrsRsdXt opened this issue May 16, 2023 · 5 comments
Closed

processor/routing ignores context attributes statements #22003

FrsRsdXt opened this issue May 16, 2023 · 5 comments
Labels
bug Something isn't working processor/routing Routing processor

Comments

@FrsRsdXt
Copy link

Component(s)

processor/routing

What happened?

Description

Routing config does not work for context attributes, all traces exported into default exporter instead
Tried several context attributes to test the router such as

  1. attributes = http.method value = GET
  2. attributes = project_code value = t575-p178 (configuration provided below)

Steps to Reproduce

Deployed Otel Collector on ECS Fargate using the configuration provided below.

Expected Result

Tried several context attributes to test the router such as

  1. attributes = http.method value = GET
    this configuration should export all traces into xray that matches http.method = GET context attributes. And export non matching traces to logs

  2. attributes = project_code value = t575-p178 (configuration provided below)
    this configuration should export all traces into xray that matches project_code = t575-p178 context attributes. And export non matching traces to logs

Actual Result

all configuration using context attributes exports traces into logs

Collector version

v0.77.0

Environment information

Environment

OS: Amazon Linux 2 on ECS Fargate

OpenTelemetry Collector configuration

extensions:
  health_check:

receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317
        include_metadata: true
      http:
        endpoint: 0.0.0.0:4318
  awsxray:
    endpoint: 0.0.0.0:2000
    transport: udp

processors:
  routing:
    default_exporters:
    - logging
    from_attribute: project_code
    attribute_source : context
    table:
    - value: t575-p178
      exporters: 
      - awsxray

exporters:
  awsxray:
    endpoint: xray.ap-southeast-1.amazonaws.com
    index_all_attributes: true
  logging:
    verbosity: detailed

service:
  pipelines:
    traces:
      receivers: [otlp,awsxray]
      exporters: [awsxray,logging]
      processors: [routing]

  extensions: [health_check]

Log output

No response

Additional context

router works for resource attributes

@FrsRsdXt FrsRsdXt added bug Something isn't working needs triage New item requiring triage labels May 16, 2023
@github-actions github-actions bot added the processor/routing Routing processor label May 16, 2023
@github-actions
Copy link
Contributor

Pinging code owners:

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

@kovrus
Copy link
Member

kovrus commented May 16, 2023

seem like the same issue as #20913

@kovrus kovrus removed the needs triage New item requiring triage label May 16, 2023
@FrsRsdXt
Copy link
Author

the trace only came from OTLP gRPC in my case. the OTLP HTTP receiver does not receive any

@jpkrohling
Copy link
Member

@kovrus, are you interested in working on this one?

@jpkrohling
Copy link
Member

Sorry, I just realized that there's a PR addressing #20913. I'm closing this one, let me know if the fix for that doesn't solve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working processor/routing Routing processor
Projects
None yet
Development

No branches or pull requests

3 participants