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

feat(publish-metrics): increase trace visibility for OTel reporter #2211

Merged
merged 3 commits into from
Oct 12, 2023

Conversation

InesNi
Copy link
Contributor

@InesNi InesNi commented Oct 12, 2023

What

Multiple improvements to OTel reporter tracing feature for the HTTP engine:

Before:

  • Each request is its own root span and a separate trace with no information on which scenario it belongs to
  • No insight on individual request phases except for responseTimeMs attribute
  • Request spans have http_request_started and http_request_ended events
  • Errors are set as a status on spans

Individual trace:
Screenshot 2023-10-12 at 20 43 22

After:

  • Scenarios are the root spans with all requests that are executed as a part of each scenario nested inside them as their child spans
  • Each request is broken down further into the following child spans (they represent the request phases respectively as they are recorded in the got response.timings.phases object):
    • dns_lookup ,
    • tcp_handshake ,
    • tls_negotiation ,
    • request ,
    • first_byte ,
    • download
  • The http_request_started and http_request_ended events have been removed due to the implementation of the request phases spans
  • Errors that occur during execution (not the ones set due to response code being 400 or more) are also recorded with span.setException() not just as a span status,
  • virtual user id is set as an attribute on all request spans as vu.uuid
  • responseTimeMs attribute changed to response.time.ms for consistency

Individual trace:
Screenshot 2023-10-12 at 20 49 40

@socket-security
Copy link

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
@opentelemetry/context-async-hooks 1.17.1 None +0 59.3 kB pichlermarc

@InesNi InesNi requested a review from a team October 12, 2023 19:56
@hassy
Copy link
Member

hassy commented Oct 12, 2023

This looks great, lgtm

@InesNi InesNi merged commit 331ee21 into main Oct 12, 2023
6 checks passed
@InesNi InesNi deleted the ifazlic-art-1394-otel-reporter-tracing-improvements branch October 12, 2023 21:11
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