<@U08GZJ30Q9X> <https://signoz.io/docs/userguide/d...
# support
h
@Nagesh Bansal https://signoz.io/docs/userguide/drop-metrics/ - I need to drop metrics for few targets. I found this documentation to do so. It’s quite unclear, where to place this config. I installed signoz using helm chart.
@Chitransh Gupta
n
Hey @Hari Krishna, you need to use the mentioned params in the otel-collector config.
h
Helm charts
signoz-helm-overrides.yaml,k8s-infra-helm-overrides.yaml
n
either you can set the filter at signoz-collector at: https://github.com/SigNoz/charts/blob/5538e02aa9e9423470653a81df13485cac157f9b/charts/signoz/values.yaml#L1321 or as you're running k8s-infra which comes up with otel-collectors also so you can place the filters at: https://github.com/SigNoz/charts/blob/5538e02aa9e9423470653a81df13485cac157f9b/charts/k8s-infra/values.yaml#L659
h
Copy code
global:
  storageClass: standard

clickhouse:
  installCustomStorageClass: true

otelCollector:
  config:
    processors:
      filter/drop_metrics_by_label_values:
        metrics:
          datapoint:
            - attributes["http.target"] == "/"
            - attributes["http.target"] == "/healthz"
I made this change and it doens’t look like it works. This change is present in
signoz-otel-collector
configmap, though.
Copy code
│ Name:         signoz-otel-collector                                                                                                                                                                                                                                                  │
│ Namespace:    signoz                                                                                                                                                                                                                                                                 │
│ Labels:       app.kubernetes.io/component=otel-collector                                                                                                                                                                                                                             │
│               app.kubernetes.io/instance=signoz                                                                                                                                                                                                                                      │
│               app.kubernetes.io/managed-by=Helm                                                                                                                                                                                                                                      │
│               app.kubernetes.io/name=signoz                                                                                                                                                                                                                                          │
│               app.kubernetes.io/version=v0.82.1                                                                                                                                                                                                                                      │
│               helm.sh/chart=signoz-0.79.2                                                                                                                                                                                                                                            │
│ Annotations:  meta.helm.sh/release-name: signoz                                                                                                                                                                                                                                      │
│               meta.helm.sh/release-namespace: signoz                                                                                                                                                                                                                                 │
│                                                                                                                                                                                                                                                                                      │
│ Data                                                                                                                                                                                                                                                                                 │
│ ====                                                                                                                                                                                                                                                                                 │
│ otel-collector-config.yaml:                                                                                                                                                                                                                                                          │
│ ----                                                                                                                                                                                                                                                                                 │
│ exporters:                                                                                                                                                                                                                                                                           │
│   clickhouselogsexporter:                                                                                                                                                                                                                                                            │
│     dsn: tcp://${env:CLICKHOUSE_USER}:${env:CLICKHOUSE_PASSWORD}@${env:CLICKHOUSE_HOST}:${env:CLICKHOUSE_PORT}/${env:CLICKHOUSE_LOG_DATABASE}                                                                                                                                        │
│     timeout: 10s                                                                                                                                                                                                                                                                     │
│     use_new_schema: true                                                                                                                                                                                                                                                             │
│   clickhousemetricswrite:                                                                                                                                                                                                                                                            │
│     disable_v2: true                                                                                                                                                                                                                                                                 │
│     endpoint: tcp://${env:CLICKHOUSE_USER}:${env:CLICKHOUSE_PASSWORD}@${env:CLICKHOUSE_HOST}:${env:CLICKHOUSE_PORT}/${env:CLICKHOUSE_DATABASE}                                                                                                                                       │
│     resource_to_telemetry_conversion:                                                                                                                                                                                                                                                │
│       enabled: true                                                                                                                                                                                                                                                                  │
│     timeout: 15s                                                                                                                                                                                                                                                                     │
│   clickhousetraces:                                                                                                                                                                                                                                                                  │
│     datasource: tcp://${env:CLICKHOUSE_USER}:${env:CLICKHOUSE_PASSWORD}@${env:CLICKHOUSE_HOST}:${env:CLICKHOUSE_PORT}/${env:CLICKHOUSE_TRACE_DATABASE}                                                                                                                               │
│     low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}                                                                                                                                                                                                          │
│     use_new_schema: true                                                                                                                                                                                                                                                             │
│   metadataexporter:                                                                                                                                                                                                                                                                  │
│     cache:                                                                                                                                                                                                                                                                           │
│       provider: in_memory                                                                                                                                                                                                                                                            │
│     dsn: tcp://${env:CLICKHOUSE_USER}:${env:CLICKHOUSE_PASSWORD}@${env:CLICKHOUSE_HOST}:${env:CLICKHOUSE_PORT}/signoz_metadata                                                                                                                                                       │
│     tenant_id: ${env:TENANT_ID}                                                                                                                                                                                                                                                      │
│     timeout: 10s                                                                                                                                                                                                                                                                     │
│   signozclickhousemetrics:                                                                                                                                                                                                                                                           │
│     dsn: tcp://${env:CLICKHOUSE_USER}:${env:CLICKHOUSE_PASSWORD}@${env:CLICKHOUSE_HOST}:${env:CLICKHOUSE_PORT}/${env:CLICKHOUSE_DATABASE}                                                                                                                                            │
│     timeout: 45s                                                                                                                                                                                                                                                                     │
│ extensions:                                                                                                                                                                                                                                                                          │
│   health_check:                                                                                                                                                                                                                                                                      │
│     endpoint: 0.0.0.0:13133                                                                                                                                                                                                                                                          │
│   pprof:                                                                                                                                                                                                                                                                             │
│     endpoint: localhost:1777                                                                                                                                                                                                                                                         │
│   zpages:                                                                                                                                                                                                                                                                            │
│     endpoint: localhost:55679                                                                                                                                                                                                                                                        │
│ processors:                                                                                                                                                                                                                                                                          │
│   batch:                                                                                                                                                                                                                                                                             │
│     send_batch_size: 50000                                                                                                                                                                                                                                                           │
│     timeout: 1s                                                                                                                                                                                                                                                                      │
│   filter/drop_metrics_by_label_values:                                                                                                                                                                                                                                               │
│     metrics:                                                                                                                                                                                                                                                                         │
│       datapoint:                                                                                                                                                                                                                                                                     │
│       - attributes["http.target"] == "/"                                                                                                                                                                                                                                             │
│       - attributes["http.target"] == "/healthz"                                                                                                                                                                                                                                      │
│   signozspanmetrics/delta:                                                                                                                                                                                                                                                           │
│     aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA                                                                                                                                                                                                                           │
│     dimensions:                                                                                                                                                                                                                                                                      │
│     - default: default                                                                                                                                                                                                                                                               │
│       name: service.namespace
n
could you please check the metrics not the traces
h
You mean here?
/
-> is still here
@Nagesh Bansal What i want is the otel collector to skip these,
n
try with url.path instead http.target
h
Still the same 😞
n
just to be sure does the metrics you want to drop have an attribute named
http.target
or
url.path
or `http.route`with a value of
/
or
/healthz
? you can use the loggingexporter with
verbosity: detailed
to check what your data looks like
Kindly check the resources attributes before applying the filter
h
Copy code
otelCollector:
  config:
    processors:
      filter/drop_spans_by_attribute_values:
        traces:
          span:
            - 'attributes["http.target"] == "/"'
            - 'attributes["http.target"] == "/healthz"'

    service:
      pipelines:
        traces:
          processors:  [filter/drop_spans_by_attribute_values, signozspanmetrics/delta, batch]
This worked.
n
This would be for traces right?
h
Yeah, i was not exporting any metrics from my app, just the traces.
And the services tab uses traces to show the laency chart, req/s and others right?
n
so it uses the metrics and traces both, you can take a look at this: https://signoz.io/docs/userguide/metrics/#view-details-about-an-application