Add getContextualName(Context c) on Observation.Convention by marcingrzejszczak · Pull Request #3301 · micrometer-metrics/micrometer (original) (raw)
without this change we can't provide a naming convention for objects that rely on contextual names e.g. all spans
with this change we can provide a standard naming convention for objects that rely on contextual names for e.g. spans
without this change we can't provide a naming convention for objects that rely on contextual names e.g. all spans with this change we can provide a standard naming convention for objects that rely on contextual names for e.g. spans
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me.
| /** |
| * Allows to override the contextual name for an observation. The Observation will |
| * be renamed only when an explicit context was passed - if an implicit context is |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the documentation about when the contextual name will be overridden might be better on Observation#createNotStarted since that is where the mentioned logic is. A user could use this method in other ways.
shakuzen deleted the contextualNameOnObservationConvention branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})