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

Promtail-generated metrics have promtail_custom prefix #1583

Closed
AndrewCooper opened this issue Jan 25, 2020 · 1 comment · Fixed by #1664
Closed

Promtail-generated metrics have promtail_custom prefix #1583

AndrewCooper opened this issue Jan 25, 2020 · 1 comment · Fixed by #1664
Labels
component/agent good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! keepalive An issue or PR that will be kept alive and never marked as stale.

Comments

@AndrewCooper
Copy link

Describe the bug
Metrics created by the metrics pipeline stage have a prefix of "promtail_custom_". This is not documented anywhere and not logged so I eventually figured it out by scraping the metrics and browsing through them manually.

To Reproduce
Steps to reproduce the behavior:
Add a unique metric name to a scrape_config pipeline, like foo_my_metric.
Scrape the metrics manually.
See the metric promail_custom_foo_my_metric in the output.

Expected behavior
Either this behavior should be removed or should be documented.

Environment:
docker image: grafana/promtail:v1.3.0

@cyriltovena cyriltovena added component/agent good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! keepalive An issue or PR that will be kept alive and never marked as stale. labels Jan 25, 2020
@adityacs
Copy link
Contributor

adityacs commented Feb 7, 2020

@cyriltovena Instead of removing the prefix, can we make it user defined like below?
prefix: user_custom

pipeline_stages:
- json:
    expressions:
      app: app
      payload: payload
- metrics:
    loki_count:
      type: Counter
      description: uhhhhhhh
      source: app
      prefix: user_custom
      config:
        value: loki
        action: inc

cyriltovena pushed a commit to cyriltovena/loki that referenced this issue Jun 11, 2021
 Pass userID explicitly, not via context
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/agent good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! keepalive An issue or PR that will be kept alive and never marked as stale.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants