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

Add getContextualName(Context c) on Observation.Convention #3301

Merged
merged 2 commits into from
Jul 20, 2022

Conversation

marcingrzejszczak
Copy link
Contributor

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

@marcingrzejszczak marcingrzejszczak added the enhancement A general enhancement label Jul 19, 2022
@marcingrzejszczak marcingrzejszczak added this to the 1.10.0-M4 milestone Jul 19, 2022
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
@marcingrzejszczak marcingrzejszczak force-pushed the contextualNameOnObservationConvention branch from 9dfb298 to 40e0b55 Compare July 19, 2022 12:29
Copy link
Member

@shakuzen shakuzen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me.

@@ -939,6 +946,17 @@ interface KeyValuesConvention {
*/
String getName();

/**
* 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
Copy link
Member

@shakuzen shakuzen Jul 20, 2022

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.

@marcingrzejszczak marcingrzejszczak merged commit 0e19b62 into main Jul 20, 2022
@shakuzen shakuzen deleted the contextualNameOnObservationConvention branch July 20, 2022 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants