Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Add Labels to exposed metrics (Question) #223

Closed
fbalicchia opened this issue Nov 9, 2021 · 5 comments
Closed

Add Labels to exposed metrics (Question) #223

fbalicchia opened this issue Nov 9, 2021 · 5 comments

Comments

@fbalicchia
Copy link

Hi,
I'd like to know if possible to add labels to metrics exposed with go-sdk. At the moment of writing, I saw that is possible to add only the key but probably I'm misunderstanding something.
Thanks for help

@fbalicchia fbalicchia changed the title Add Labels to exposed metrics Add Labels to exposed metrics (Question) Nov 9, 2021
@fbalicchia
Copy link
Author

Ops sorry just see this issue proxy-wasm/proxy-wasm-cpp-sdk#130

@mathetake
Copy link
Member

Hi @fbalicchia, "tags" are not directly supported in the Wasm ABI and there's several reasons for this (one is Envoy's internal API doesn't support dynamic tags). That means this is not the Go SDK specific issue, and you cannot define tags with any language SDK.

However you can "extract" tags from the name of metrics by configuring Envoy's StatsConfig.stats_tags(https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/metrics/v3/stats.proto#config-metrics-v3-statsconfig) properly. This is exactly what Istio does where the expose prometheus metrics with their custom tags.

@fbalicchia
Copy link
Author

thanks, @mathetake for explanation

@mathetake
Copy link
Member

I hope this #246 clarify your question!

@fbalicchia
Copy link
Author

@mathetake yes thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants