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

[Bug] sdk metrics do not include tags added with "telemetry.global_tags" #775

Open
antmendoza opened this issue Feb 25, 2025 · 2 comments
Open
Labels
bug Something isn't working

Comments

@antmendoza
Copy link
Member

What are you really trying to do?

Add custom tags to SDK metrics

Describe the bug

sdk metrics no longer include tags added with telemetry.global_tags , which appear to be the expected behavior https://python.temporal.io/temporalio.runtime.TelemetryConfig.html#global_tags

Image

running the same with version 1.3 works as expected

Image

Minimal Reproduction

Environment/Versions

  • OS and processor: [e.g. M1 Mac, x86 Windows, Linux]
  • Temporal Version: [e.g. 1.14.0?] and/or SDK version
  • Are you using Docker or Kubernetes or building Temporal from source?

Additional context

@antmendoza antmendoza added the bug Something isn't working label Feb 25, 2025
@cretz
Copy link
Member

cretz commented Feb 25, 2025

To clarify, issue #380 inadvertently didn't set global_tags on Rust side. We need to make sure it is set and add a test or alter test_different_runtimes to confirm this setting (and maybe any others we want coverage for).

@cretz
Copy link
Member

cretz commented Feb 27, 2025

The issue here is that we use OTel's Prometheus exporting which takes the approach at https://prometheus.io/docs/guides/opentelemetry/#including-resource-attributes-at-query-time. Namely the global_tags are on target_info which you can combine with the rest at query time. I have opened temporalio/sdk-core#882 to have us put the labels on every metric by default (with an option to restore to today's behavior).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants