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

Metric Datapoint attribute isn't getting filtered out via otelcollector #24277

Closed
Ryang20718 opened this issue Jul 14, 2023 · 1 comment
Closed
Labels
bug Something isn't working Stale waiting for author

Comments

@Ryang20718
Copy link

Component(s)

No response

What happened?

Metric data attributes aren't getting filtered out from otel metrics

Collector version

0.79.0

Environment information

Environment

  • OS: Ubuntu
  • Architecture: x86
  • Go Version: 1.20
  • otelgrpc version: v0.42.0

OpenTelemetry Collector configuration

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

processors:
  batch:
  filter:
    metrics:
      exclude:
        match_type: strict
        metric_names:
        - net.sock.peer.addr


exporters:
  logging:
    loglevel: debug

service:
  pipelines:
    metrics:
      receivers: [otlp]
      processors: [filter]
      exporters: [logging]

Log output

Data point attributes:
     -> net.sock.peer.addr: Str(172.19.0.5)
     -> net.sock.peer.port: Int(51452)
     -> rpc.grpc.status_code: Int(0)
     ....

Expected behavior

We expected that the data point attribute will be filtered out. However, we see that the metric attribute is still within the payload

Data point attributes:
     -> net.sock.peer.port: Int(51452)
     -> rpc.grpc.status_code: Int(0)
     ....


### Additional context

1. Using the default tracing/metrics for otel,
grpcServer := grpc.NewServer(
	grpc.UnaryInterceptor(otelgrpc.UnaryServerInterceptor()),
	grpc.StreamInterceptor(otelgrpc.StreamServerInterceptor()),
	grpc.MaxRecvMsgSize(100*1024*1024), 
)

2. Run the otel collector
3. We still see attributes not getting filtered out
@crobert-1
Copy link
Member

crobert-1 commented Sep 5, 2023

Hello @Ryang20718, just to clarify, your goal is to keep the metric itself, but to delete the attribute within the metric, is that correct?

If that's the case, what you want to use is the attributes processor, which can delete attributes from the metrics received.

@crobert-1 crobert-1 removed the needs triage New item requiring triage label Oct 24, 2023
@github-actions github-actions bot removed the Stale label Oct 25, 2023
@atoulme atoulme closed this as not planned Won't fix, can't repro, duplicate, stale Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale waiting for author
Projects
None yet
Development

No branches or pull requests

3 participants