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

Events in DocumentedObservation #3367

Merged
merged 4 commits into from
Aug 25, 2022
Merged

Events in DocumentedObservation #3367

merged 4 commits into from
Aug 25, 2022

Conversation

marcingrzejszczak
Copy link
Contributor

No description provided.

@@ -46,7 +47,7 @@ class SimpleObservation implements Observation {

private final Collection<ObservationFilter> filters;

SimpleObservation(String name, ObservationRegistry registry, Context context) {
SimpleObservation(@Nullable String name, ObservationRegistry registry, Context context) {
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure that this can be null here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I mean look at line 60, we literally null the name

Copy link
Member

Choose a reason for hiding this comment

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

I get that a DocumentedObservation's getName() can return null for filtering purposes but if I take a step back, that might be valid for the DocumentedObservation but I think SimpleObservation should not accept null here. What should the meter handler or the tracing handler do in that case?

Also, DocumentedObservation has a null-check so that nullability behavior can be isolated there I guess.

@marcingrzejszczak
Copy link
Contributor Author

@cppwfs this might break task cause afair you're using events already. You'll need to change new Observation.Event(...) to Observation.Event.of(...)

@marcingrzejszczak marcingrzejszczak merged commit d8fa9f6 into main Aug 25, 2022
@jonatan-ivanov jonatan-ivanov deleted the event branch August 25, 2022 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants