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

OpenTelemetry tracing for the interLink API server #285

Merged
merged 2 commits into from
Aug 29, 2024

Conversation

Surax98
Copy link
Collaborator

@Surax98 Surax98 commented Aug 26, 2024

Summary

Following the #272 PR, this one aims to implement a Otel tracing for the API server.
Since a function to set some spans' attributes was common, it has been moved to a new file called spans.go which is part of the interlink package, so any other applicative (for example plugins) can use it to set the duration of a monitored part of the code. This function supports Functional Options, so it can be easily expanded with more functionalities in the future. Right now, it supports WithHTTPReturnCode(code) as option, setting this HTTP status code as an attribute of the span; in the same way, more options will be possible to be passed to set more attributes using the same function.

Related issue :

Copy link
Collaborator

@dciangot dciangot left a comment

Choose a reason for hiding this comment

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

LGTM

@dciangot dciangot merged commit 24c4597 into interTwin-eu:main Aug 29, 2024
2 of 3 checks passed
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.

2 participants