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

Support write_relabel_configs at push_config level #502

Closed
ponson-thankavel-finastra opened this issue Mar 31, 2021 · 4 comments
Closed
Labels
frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. stale Issue/PR mark as stale due lack of activity

Comments

@ponson-thankavel-finastra

Background: Our K8s cluster is used by multiple tenants (separated by namespaces). We maintain a grafana cloud stack for each of the tenants. We need to collect traces for tenants and stream to respective grafana cloud stack. All tenant applications will send their traces to same endpoint "localhost:55680".

Ask: Is it possible to support write_relabel_configs as part of push_config? below config example illustrates the requirement. grafana agent for metrics & logs support similar configuration.

tempo:
  configs:
    - name: tempo-config
       push_config: 
        - name: tenant1
          basic_auth:
            username: 12345
            password_file: /etc/agent/secrets/tenant1/password
          endpoint: tempo-us-central1.grafana.net
          write_relabel_configs:
            - action: keep
              regex: tenant1-ns1|tenant1-ns2
              source_labels:
                - namespace
        - name: tenant2
          basic_auth:
            username: 45678
            password_file: /etc/agent/secrets/tenant1/password
          endpoint: tempo-us-central1.grafana.net
          write_relabel_configs:
            - action: keep
              regex: tenant2-ns1|tenant2-ns2
              source_labels:
                - namespace
      receivers:
        otlp:
          protocols:
            grpc: 
              endpoint: "localhost:55680"
      scrape_configs:
        - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
          job_name: kubernetes-pods
          kubernetes_sd_configs:
            - role: pod
@rfratto
Copy link
Member

rfratto commented Mar 31, 2021

cc @mapno and @joe-elliott for thoughts here

@mapno
Copy link
Member

mapno commented Apr 6, 2021

Hey, thanks for submitting the issue. At the moment, our tracing pipelines do not support a feature that covers all that write_relabel_configs can do in Prometheus. We only support manipulation (i.e. relabelling) of tags on spans that pass through the agent (see docs).

Filtering out spans by attributes/tags is something doable in the agent and could be implemented. However, it's common that not all spans of a trace contain the same tags. Would your use case be covered by filtering by span or would you be interested in filtering by trace?

We're currently working on an implementation of tail-based sampling. This feature will cover filtering traces by tags, but it's probably overkill if the filtering can be done at the span level.

cc/ @ponson-thankavel-finastra

@mapno
Copy link
Member

mapno commented Apr 16, 2021

Hi @ponson-thankavel-finastra, we've recently merged an implementation of tail-based sampling to the agent (PR), that allows filtering by trace tags. Let us know if that works for you.

@stale
Copy link

stale bot commented Jun 2, 2021

This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue/PR mark as stale due lack of activity label Jun 2, 2021
@stale stale bot closed this as completed Jun 9, 2021
@github-actions github-actions bot added the frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. label Feb 23, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. stale Issue/PR mark as stale due lack of activity
Projects
None yet
Development

No branches or pull requests

3 participants