-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[mdatagen] add CustomMetricName func #9455
[mdatagen] add CustomMetricName func #9455
Conversation
This allows components to generate a consistent metric name. Doing this in mdatagen will allow us to remove the need to export methods in helpers, for example `BuildCustomMetricName`. Eventually we might want to define the custom metrics for each component's internal telemetry via metadata.yaml, at which point we can remove this func. For now it allows us to clean up some more code. Signed-off-by: Alex Boten <[email protected]>
Signed-off-by: Alex Boten <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would maybe consider connector/forward
as the meter name instead, since that would nicely group all the metrics.
@bogdandrutu i think there's a few different ways we're currently customizing telemetry for internal components. In some cases, we're using a specific meter name: In others we're prefixing the component details in the name of the metric:
And in yet another case, we're adding specific component in a separate label:
I think it makes sense to consolidate these into a consistent experience for component owners are well as end users, I would suggest using issue #9315 to decide on the right path to move forward. This PR allows us to hide the details of getting a custom metric name behind a generated method internal to components rather than an exposed API in the processor helper. WDYT? |
We are doing that for legacy reasons, opencensus did not have a namespace/scope.
I find no problem with this, since we record this from "exporterhelper" it is a fine way of doing it. We could have created different scopes per initialization or using one scope and put that as attribute. If you ask me what I would prefer is to put that in the scope, but again when that was created we had opencensus without namespace/scope so this was not an option. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
This allows components to generate a consistent metric name. Doing this in mdatagen will allow us to remove the need to export methods in helpers, for example
BuildCustomMetricName
.Eventually we might want to define the custom metrics for each component's internal telemetry via metadata.yaml, at which point we can remove this func. For now it allows us to clean up some more code.