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 support for Span Events #200

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marcotc
Copy link
Member

@marcotc marcotc commented Oct 31, 2024

This PR adds support for the top-level Span field "span_events" in the agent.

Currently waiting for the real agent changes, to ensure the behaviors match.

Signed-off-by: Marco Costa <[email protected]>
@marcotc marcotc force-pushed the marcotc/add_agent_span_events_support branch from e2e8837 to c96f2d3 Compare October 31, 2024 21:39
Comment on lines +483 to +486
if "span_events" in span:
for event in span["span_events"]:
if "attributes" in event:
event["attributes"].pop(key[23:], None)

Choose a reason for hiding this comment

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

🔴 Code Quality Violation

too many nesting levels (...read more)

Avoid to nest too many loops together. Having too many loops make your code harder to understand.
Prefer to organize your code in functions and unit of code you can clearly understand.

Learn More

View in Datadog  Leave us feedback  Documentation

Comment on lines +377 to +388
if diff_key not in d_exp:
raise AssertionError(
f"Span event {diff_type} value '{diff_key}' in received span event but is not in the expected span event."
)
elif diff_key not in d_rec:
raise AssertionError(
f"Span event {diff_type} value '{diff_key}' in expected span event but is not in the received span event."
)
else:
raise AssertionError(
f"Span event {diff_type} mismatch on '{diff_key}': got '{d_rec[diff_key]}' which does not match expected '{d_exp[diff_key]}'."
)

Choose a reason for hiding this comment

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

🔴 Code Quality Violation

too many nesting levels (...read more)

Avoid to nest too many loops together. Having too many loops make your code harder to understand.
Prefer to organize your code in functions and unit of code you can clearly understand.

Learn More

View in Datadog  Leave us feedback  Documentation

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.

1 participant