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 manual instrumentation to emailservice #158

Conversation

julianocosta89
Copy link
Member

Towards #55 .

  • Services extend automatic instrumentation.
    • New attributes/events attached to existing spans.
    • New spans are being created from existing spans.

Changes

Adds attributes to auto instrumented spans, and creates a new span with attributes.
If sending the email fails (what doesn't happen at the moment), span.recordException() is called from the auto-instrumented span, which ultimately creates a Span event.

@julianocosta89 julianocosta89 requested review from a team and ahayworth June 19, 2022 16:07
@julianocosta89
Copy link
Member Author

@ahayworth also added you as a reviewer.
Would you mind taking a look? 👀

@cartersocha
Copy link
Contributor

LGTM

@ahayworth
Copy link
Contributor

@julianocosta89 @cartersocha Yes I will take a look this afternoon - I am busy this morning, but I have a suggestion or two and I'll write those up in a bit. 😄

Copy link
Contributor

@ahayworth ahayworth left a comment

Choose a reason for hiding this comment

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

Thanks for adding this! After thinking about it, I would want to request a few changes before we merge this in. They're a little bit nit-picky, but since this is a reference application I felt maybe it was appropriate. 😄

(Of course, these are "strong opinions, weakly held" and I won't be upset if you choose not to take them. We also really appreciate the contribution! ❤️ )

src/emailservice/email_server.rb Outdated Show resolved Hide resolved
src/emailservice/email_server.rb Outdated Show resolved Hide resolved
src/emailservice/email_server.rb Outdated Show resolved Hide resolved
Copy link
Contributor

@mic-max mic-max left a comment

Choose a reason for hiding this comment

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

LGTM - I agree with @ahayworth's comments as well

@julianocosta89
Copy link
Member Author

Thank you very much for the review @ahayworth!
I will apply the changes later and let you all know.

Regarding the tracer with an empty name I want to bring @puckpuck to the thread, because i believe it would be better if we follow the same approach in all services.

@julianocosta89
Copy link
Member Author

@ahayworth this one should be good to go now.
Would you mind taking a 2nd look?

Copy link
Contributor

@ahayworth ahayworth left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks so much! 😄

@julianocosta89
Copy link
Member Author

@cartersocha this one should be good to go 🤩

@cartersocha cartersocha merged commit 5230a89 into open-telemetry:main Jun 23, 2022
@julianocosta89 julianocosta89 deleted the emailservice-manual-instrumentation branch June 23, 2022 16:56
GaryPWhite pushed a commit to wayfair-contribs/opentelemetry-demo that referenced this pull request Jun 30, 2022
* Add manual instrumentation to emailservice

* Apply name suggestion

* Apply suggestions

Co-authored-by: Carter Socha <43380952+cartersocha@users.noreply.github.com>
jmichalak9 pushed a commit to jmichalak9/opentelemetry-demo that referenced this pull request Mar 22, 2024
* Add manual instrumentation to emailservice

* Apply name suggestion

* Apply suggestions

Co-authored-by: Carter Socha <43380952+cartersocha@users.noreply.github.com>
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.

6 participants