-
Notifications
You must be signed in to change notification settings - Fork 115
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 instrumentation to content-app #4745
Conversation
8fc7be0
to
b69216f
Compare
b69216f
to
cb5a6b1
Compare
7c1508f
to
4411a6f
Compare
I leaned to option B -- temporarily using the code from the upstream repository. Since no content-app endpoints are designed to handle POST/PUT requests, I am testing only HEAD and GET requests on a file distribution. Do you find these tests satisfactory, @decko? |
af2197f
to
65e1b08
Compare
Telemetry tests are enabled only for the Azure runner: Line 52 in f0569f4
|
d5fe356
to
585bb08
Compare
90628ae
to
42a399b
Compare
assert received_otel_span( | ||
{ | ||
"http.method": "GET", | ||
"http.target": f"/pulp/content/{distribution.base_path}/{file_name}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to take care of domains
and redirects to content storage here...
8de03eb
to
72809f3
Compare
72809f3
to
40d40f8
Compare
@@ -68,6 +68,7 @@ async def _traces_handler(request): | |||
for item in span.attributes | |||
} | |||
spans.append(attrs) | |||
print(attrs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was intentional for this to be here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not cluttering the CI logs and it helps with further debugging to see whether the span was received on the server or not. Do you think logging is better than printing? I am going to replace it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with just a question
It seems the upstream is not yet able to release this, but they are working on it, see this and this. Given that it's not available yet, I'm in favor of vendoring it for a release or two in Pulp because we have users who have been waiting and are very eager to try it. Also it comes with functional tests so unlike the previous pull request this does have tests that cover the vendored code. @mdellweg wdyt about this approach? I don't want to have this merged without your input. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
40d40f8
to
a6a864d
Compare
The instrumentation code from the upstream PR was brought down to pulpcore because of pypi/support#3353. closes pulp#3829
a6a864d
to
1332cff
Compare
The instrumentation code from the upstream PR was brought down to pulpcore because of pypi/support#3353.
closes #3829