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

Migrate otel metrics to use mdatagen: routing processor #33526

Closed
Tracked by #33523
codeboten opened this issue Jun 12, 2024 · 2 comments · Fixed by #33539
Closed
Tracked by #33523

Migrate otel metrics to use mdatagen: routing processor #33526

codeboten opened this issue Jun 12, 2024 · 2 comments · Fixed by #33539
Assignees
Labels
processor/routing Routing processor

Comments

@codeboten
Copy link
Contributor

No description provided.

@codeboten codeboten changed the title routing processor Migrate otel metrics to use mdatagen: routing processor Jun 12, 2024
@jpkrohling jpkrohling self-assigned this Jun 13, 2024
@crobert-1 crobert-1 added processor/routing Routing processor labels Jun 13, 2024
Copy link
Contributor

Pinging code owners for processor/routing: @jpkrohling. See Adding Labels via Comments if you do not have permissions to add labels yourself.

1 similar comment
Copy link
Contributor

Pinging code owners for processor/routing: @jpkrohling. See Adding Labels via Comments if you do not have permissions to add labels yourself.

jpkrohling added a commit to jpkrohling/opentelemetry-collector-contrib that referenced this issue Jun 20, 2024
Before:
```
otelcol_routing_processor_non_routed_log_records{routing_key="",service_instance_id="c0c03666-9ef6-456e-ae9d-b5d8c2041ce4",service_name="otelcontribcol",service_version="0.102.0-dev"} 1
otelcol_routing_processor_non_routed_metric_points{routing_key="",service_instance_id="c0c03666-9ef6-456e-ae9d-b5d8c2041ce4",service_name="otelcontribcol",service_version="0.102.0-dev"} 1
otelcol_routing_processor_non_routed_spans{routing_key="",service_instance_id="c0c03666-9ef6-456e-ae9d-b5d8c2041ce4",service_name="otelcontribcol",service_version="0.102.0-dev"} 2
```

After:
```
otelcol_routing_processor_non_routed_log_records{routing_key="",service_instance_id="f27bc682-a3a0-44ed-9b88-b870dd4d096a",service_name="otelcontribcol",service_version="0.102.0-dev"} 1
otelcol_routing_processor_non_routed_metric_points{routing_key="",service_instance_id="f27bc682-a3a0-44ed-9b88-b870dd4d096a",service_name="otelcontribcol",service_version="0.102.0-dev"} 1
otelcol_routing_processor_non_routed_spans{routing_key="",service_instance_id="f27bc682-a3a0-44ed-9b88-b870dd4d096a",service_name="otelcontribcol",service_version="0.102.0-dev"} 2
```

Configuration used for testing:
```yaml
receivers:
  otlp:
    protocols:
      grpc:
        endpoint: localhost:4317

processors:
  routing:
    default_exporters: [ debug/routed ]
    attribute_source: resource
    from_attribute: vip
    error_mode: ignore
    table:
      - value: "true"
        exporters:
          - debug/vip

exporters:
  debug:
    verbosity: detailed
  debug/routed:
    verbosity: detailed
  debug/vip:
    verbosity: detailed

service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [routing]
      exporters: [debug, debug/routed, debug/vip]
    logs:
      receivers: [otlp]
      processors: [routing]
      exporters: [debug, debug/routed, debug/vip]
    metrics:
      receivers: [otlp]
      processors: [routing]
      exporters: [debug, debug/routed, debug/vip]
```

Test commands:
```
telemetrygen metrics --metrics 1 --otlp-insecure --otlp-attributes='vip="false"'
telemetrygen logs --logs 1 --otlp-insecure --otlp-attributes='vip="false"'
telemetrygen traces --traces 1 --otlp-insecure --otlp-attributes='vip="false"'
```

Fixes open-telemetry#33526

Signed-off-by: Juraci Paixão Kröhling <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
processor/routing Routing processor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants