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 Observations for send/receive #146

Merged
merged 1 commit into from
Sep 27, 2022

Conversation

onobc
Copy link
Collaborator

@onobc onobc commented Sep 27, 2022

This adds observations to PulsarTemplate and DefaultPulsarMessageListenerContainer.

Remaining items (follow on PRs)

Big thanks to @artembilan and @garyrussell for trailblazing this in spring-kafka as this was my reference model for this proposal.

@marcingrzejszczak @jonatan-ivanov if either of you get a chance to give this a once-over that would be great. However, I know that treatment was applied to spring-kafka and as stated above, this was modeled from that. I am fairly certain there will be no surprises here.

Copy link

@marcingrzejszczak marcingrzejszczak left a comment

Choose a reason for hiding this comment

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

I don't know the details of how Pulsar works, but from the point of view of Observability this looks good :) I would love to see a Zipkin screenshot to confirm the tracing part.

@onobc
Copy link
Collaborator Author

onobc commented Sep 27, 2022

I went ahead and added the auto-generated docs as a 2nd commit in this PR. Looks good...

Screen Shot 2022-09-27 at 10 27 31 AM

Screen Shot 2022-09-27 at 10 28 41 AM

Copy link
Member

@artembilan artembilan left a comment

Choose a reason for hiding this comment

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

Why generated docs are missed from the commit?

@onobc
Copy link
Collaborator Author

onobc commented Sep 27, 2022

Why generated docs are missed from the commit?

We have not been checking them in as the build creates them. Do you check them in SI and/or SK?

@artembilan
Copy link
Member

Do you check them in SI ?

I do at the moment. Plus I also added a condition to not run that Gradle task on CI.
My point was that this doc eventually going to be "very static" when the code base will have settled.

Although I'll debate with myself if this really has to be deferred to the docs creation phase instead.

@onobc
Copy link
Collaborator Author

onobc commented Sep 27, 2022

Do you check them in SI ?

I do at the moment. Plus I also added a condition to not run that Gradle task on CI. My point was that this doc eventually going to be "very static" when the code base will have settled.

Although I'll debate with myself if this really has to be deferred to the docs creation phase instead.

That would be a true optimization (dont' run during build if its 99% static content). However, if the tool picks up changes (would not happen automatically unless version was set to latest or snaphot though) we would not see those w/o manually running. Also, people may forget to run the docs generator when something changes. They would have to know what those change-worthy things are.

Copy link
Member

@artembilan artembilan left a comment

Choose a reason for hiding this comment

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

Did you see Checkstyle failures:

Error: eckstyle] [ERROR] /home/runner/work/spring-pulsar/spring-pulsar/spring-pulsar/src/main/java/org/springframework/pulsar/observation/PulsarMessageSenderContext.java:74:9: Class MessageHolder should be declared as final. [FinalClass]

?

@onobc
Copy link
Collaborator Author

onobc commented Sep 27, 2022

Did you see Checkstyle failures:

Yeh I did. I am going to squash/rebase a bit and will address then.

Error: eckstyle] [ERROR] /home/runner/work/spring-pulsar/spring-pulsar/spring-pulsar/src/main/java/org/springframework/pulsar/observation/PulsarMessageSenderContext.java:74:9: Class MessageHolder should be declared as final. [FinalClass]

* Observes sends on PulsarTemplate
* Observes receives on PulsarListener
* Adds auto-generated adocs

Closes spring-projects#29
@onobc onobc merged commit b2d988a into spring-projects:main Sep 27, 2022
@onobc onobc deleted the cbono-observations branch September 27, 2022 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants