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

"error in prometheus reporter" warnings in Temporal Server 1.23.0 (CLI version 0.12.0) #5897

Closed
tomwheeler opened this issue May 9, 2024 · 0 comments · Fixed by #5932
Closed

Comments

@tomwheeler
Copy link

When starting a local Temporal development server using Temporal CLI version 0.12.0, I observe "error in prometheus reporter" warnings in the terminal window. Although I experience this while using the CLI, I believe the underlying problem is in the server code, so I am reporting it here. There have been similar issues in the past, though none still open nor recent enough that I believe this to be a duplicate of those.

Expected Behavior

When starting the development server via the CLI, I expect to see a couple of relevant startup messages. Since the server is self-contained and requires no setup or configuration from the user, I do not expect to see warnings or errors unless I've started the program incorrectly (e.g., specifying malformed arguments or attempting to bind to a port already in use).

Actual Behavior

Soon after starting the development server via the CLI, I consistently see two or more warnings with the message "error in prometheus reporter" in the terminal window where that server is running. Here is a complete copy of the terminal session in which I started the development server about 45 minutes ago (there are two such warnings, both of which appeared in the first 10 minutes):

$ temporal server start-dev
Temporal server is running at: localhost:7233
Web UI is running at: http://localhost:8233
Metrics available at: http://localhost:52072/metrics
time=2024-05-09T16:41:20.407 level=WARN msg="error in prometheus reporter" error="a previously registered descriptor with the same fully-qualified name as Desc{fqName: \"AccessHistoryOld\", help: \"AccessHistoryOld counter\", constLabels: {}, variableLabels: [{namespace <nil>} {service_name <nil>} {operation <nil>}]} has different label names or a different help string"
time=2024-05-09T16:41:20.419 level=WARN msg="error in prometheus reporter" error="a previously registered descriptor with the same fully-qualified name as Desc{fqName: \"AccessHistoryOld\", help: \"AccessHistoryOld counter\", constLabels: {}, variableLabels: [{service_name <nil>} {operation <nil>} {namespace <nil>}]} has different label names or a different help string"

Steps to Reproduce the Problem

  1. Install Temporal CLI version 0.12.0 (which is based on Temporal Server release 1.23.0). I did this via homebrew, although I doubt that the installation method is relevant
  2. Run temporal server start-dev to start the development server
  3. Run a few Workflows. It does not matter which. I have experienced this while running a reference application, exercise code from a training course, and examples from the samples-go repository.

Specifications

  • Version: Temporal CLI version 0.12.0
  • Platform: M2 MacBook Pro, running MacOS 13.6.6
alexshtin added a commit that referenced this issue May 15, 2024
## What changed?
<!-- Describe what has changed in this PR -->
Fix prometheus warning message by adding `namespace` tag.

```
{"level":"warn","ts":"2024-05-14T15:14:32.598-0700","msg":"error in prometheus reporter","error":"a previously registered descriptor with the same fully-qualified name as Desc{fqName: \"AccessHistoryNew\", help: \"AccessHistoryNew counter\", constLabels: {}, variableLabels: {operation,namespace,service_name}} has different label names or a different help string","logging-call-at":"config.go:432"}
```

Note: code will be removed very soon.

## Why?
<!-- Tell your future self why have you made these changes -->
Set of tags must be the same on the same metric. I hope it fixes #5897.

## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
Run it locally and checked logs with eyeballing.
ychebotarev pushed a commit to ychebotarev/temporal that referenced this issue May 16, 2024
## What changed?
<!-- Describe what has changed in this PR -->
Fix prometheus warning message by adding `namespace` tag.

```
{"level":"warn","ts":"2024-05-14T15:14:32.598-0700","msg":"error in prometheus reporter","error":"a previously registered descriptor with the same fully-qualified name as Desc{fqName: \"AccessHistoryNew\", help: \"AccessHistoryNew counter\", constLabels: {}, variableLabels: {operation,namespace,service_name}} has different label names or a different help string","logging-call-at":"config.go:432"}
```

Note: code will be removed very soon.

## Why?
<!-- Tell your future self why have you made these changes -->
Set of tags must be the same on the same metric. I hope it fixes temporalio#5897.

## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
Run it locally and checked logs with eyeballing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant