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

Fix warning message condition for subsegment ending #434

Merged
merged 1 commit into from
May 29, 2024

Conversation

majanjua-amzn
Copy link
Contributor

Currently, logs for lambda look like the following:

...
'_AWS_XRAY_DAEMON_PORT': '2000', 'LC_CTYPE': 'C.UTF-8', 'PYTHONPATH': '/var/runtime', '_X_AMZN_TRACE_ID': 'Root=1-66572db3-0f8e31d10b2f289d7faad872;Lineage=0fd2a748:0'})
[WARNING]	2024-05-29T13:29:34.205Z	e983bd69-7edd-4c92-a7f7-d697aef16a54	No subsegment to end.
[WARNING]	2024-05-29T13:29:34.205Z	e983bd69-7edd-4c92-a7f7-d697aef16a54	No subsegment to end.
END RequestId: e983bd69-7edd-4c92-a7f7-d697aef16a54
...

We want these No subsegment to end messages only to appear if there is no trace entity found at all. Instead, if there is a dummy segment (like in a Lambda Passthrough environment), we should not emit any message.

Description of changes:

  • Update condition for error message appearance
  • Change variable name to make it clear it can be any trace entity, not just a subsegment but also a segment

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@majanjua-amzn majanjua-amzn requested a review from a team as a code owner May 29, 2024 16:28
@wangzlei wangzlei merged commit 1ea7768 into aws:master May 29, 2024
11 of 12 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