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

HH-231026 small fixes #742

Merged
merged 1 commit into from
Sep 20, 2024
Merged

HH-231026 small fixes #742

merged 1 commit into from
Sep 20, 2024

Conversation

712u3
Copy link
Contributor

@712u3 712u3 commented Sep 20, 2024

@712u3 712u3 requested a review from a team as a code owner September 20, 2024 10:54
Comment on lines 93 to 95
span.set_attribute(SpanAttributes.USER_AGENT_ORIGINAL, tornado_request.headers.get('User-Agent'))
if hasattr(tornado_request, '_path_format'):
span.set_attribute(SpanAttributes.HTTP_ROUTE, getattr(tornado_request, '_path_format'))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

это новые строчки, остальное сдвинул просто

description=otel_status_description,
)
span.set_attribute(SpanAttributes.HTTP_STATUS_CODE, status_code)
span.set_attribute(SpanAttributes.USER_AGENT_ORIGINAL, tornado_request.headers.get('User-Agent'))
Copy link
Contributor

Choose a reason for hiding this comment

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

Давай если по каким-то неведомым причинам юзер агента нет, проставим явно 'noUserAgent', как в джаве https://github.com/hhru/nuts-and-bolts/blob/5278d44115583b6ac7fd48aa7a4919ecedf69df4/nab-telemetry/src/main/java/ru/hh/nab/telemetry/TelemetryFilter.java#L67

@hh-sonar-app
Copy link

hh-sonar-app bot commented Sep 20, 2024

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@hhrelease hhrelease merged commit cfe3e30 into master Sep 20, 2024
1 of 2 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.

3 participants