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

Refactor fault/error logic #26681

Merged
merged 5 commits into from
Sep 19, 2023

Conversation

harrryr
Copy link
Contributor

@harrryr harrryr commented Sep 13, 2023

Description:
This PR just refactors the logic in the awsxrayexporter as it was hard to follow the logical flow of the code. No functional changes.

Link to tracking Issue:

Testing:
Ran unit tests
Ran integration test by creating eks cluster and activating sample app.

Documentation:

@harrryr harrryr requested review from a team and dashpole September 13, 2023 23:41
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Sep 13, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@harrryr harrryr force-pushed the refactor-fault-error-logic branch from 8e66ca7 to 9a32258 Compare September 13, 2023 23:47
@songy23 songy23 added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Sep 14, 2023
@@ -118,41 +118,34 @@ func makeCause(span ptrace.Span, attributes map[string]pcommon.Value, resource p
}
}

// The logic to record error and fault should be kept in sync with the ADOT pulse repo whenever possible except for the throttle
// https://github.com/aws-observability/aws-apm-java-instrumentation/blob/main/awsagentprovider/src/main/java/software/amazon/opentelemetry/javaagent/providers/AwsSpanMetricsProcessor.java
Copy link
Member

Choose a reason for hiding this comment

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

nit: format seems off

Copy link
Member

@songy23 songy23 left a comment

Choose a reason for hiding this comment

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

LGTM, pinging code owners for review @wangzlei, @srprash

code = val.Int()
}

isThrottle = false
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we have a default false value for isError and isFault as well? This can simplify the switch block.

@harrryr harrryr requested a review from pxaws September 15, 2023 17:30
Copy link
Contributor

@wangzlei wangzlei left a comment

Choose a reason for hiding this comment

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

LGTM

@harrryr harrryr force-pushed the refactor-fault-error-logic branch from 801e655 to 9704ad3 Compare September 18, 2023 18:17
@dmitryax dmitryax merged commit 76687fb into open-telemetry:main Sep 19, 2023
90 checks passed
@github-actions github-actions bot added this to the next release milestone Sep 19, 2023
jmsnll pushed a commit to jmsnll/opentelemetry-collector-contrib that referenced this pull request Nov 12, 2023
**Description:** 
This PR just refactors the logic in the awsxrayexporter as it was hard
to follow the logical flow of the code. No functional changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exporter/awsxray Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants