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

[exporter/awsxray] Change exporter.awsxray.skiptimestampvalidation feature gate from Alpha to Beta #100

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

jj22ee
Copy link

@jj22ee jj22ee commented Sep 22, 2023

Description:

Cherry-picking the following commit (scheduled for OTel v0.86.0 release):
open-telemetry#26553

Link to tracking Issue:

Testing:

Documentation:

…ature gate from Alpha to Beta (open-telemetry#26553)

**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
Change `exporter.awsxray.skiptimestampvalidation` feature gate from
Alpha to Beta. This will change the `awsxrayexporter` to not drop
invalid trace ids (first 32-bits of trace id in Unix epoch time is not
within past 30 days) by default.

**Link to tracking Issue:** <Issue number if applicable>
N/A

**Testing:** <Describe what testing was performed and which tests were
added.>
Updated Unit tests.

Local testing:
Used [Golang OTel instrumented sample
app](https://github.com/aws-observability/aws-otel-community/tree/master/centralized-sampling-tests/sample-apps/golang-http-server)
Built the ADOT Collector locally with [the timestamp check removal
change](open-telemetry#26041),
and ran locally with feature gate enabled

Scenarios tested with XRay Service (drops W3C trace):
- Removed the ID Generator in Golang sample app, created a few traces
with W3C trace ID
  - result: Collector logs indicate that XRay has dropped the segments
- Created a batch of traces with W3C trace ID and XRay trace ID
- result: Collector logs indicate that XRay has dropped only the w3c
segments

Example logs from XRay logged by awsxrayexporter due to invalid trace
IDs sent to XRay:
```
2023-09-07T17:29:30.495Z	debug	[email protected]/awsxray.go:79	response: {
  UnprocessedTraceSegments: [{
      ErrorCode: "InvalidTraceId",
      Id: "33f5358b5290fbc8",
      Message: "Invalid segment. ErrorCode: InvalidTraceId"
    },{
      ErrorCode: "InvalidTraceId",
      Id: "6be91641d130c356",
      Message: "Invalid segment. ErrorCode: InvalidTraceId"
    }]
}	{"kind": "exporter", "data_type": "traces", "name": "awsxray"}
```


**Documentation:** <Describe the documentation added.>
Updated awsxrayexporter README to indicate that the exporter will not
drop the traces with invalid trace ids anymore. Let X-Ray handle the
logic for dropping the traces instead.

---------

Co-authored-by: Anthony Mirabella <[email protected]>
Copy link
Collaborator

@mxiamxia mxiamxia left a comment

Choose a reason for hiding this comment

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

LGTM

@sky333999 sky333999 merged commit 9687093 into amazon-contributing:aws-cwa-dev Sep 25, 2023
86 of 87 checks passed
lisguo pushed a commit to lisguo/opentelemetry-collector-contrib that referenced this pull request Oct 20, 2023
…ature gate from Alpha to Beta (open-telemetry#26553) (amazon-contributing#100)

**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->

Cherry-picking the following commit (scheduled for OTel `v0.86.0` release):
open-telemetry#26553

**Link to tracking Issue:** <Issue number if applicable>

**Testing:** <Describe what testing was performed and which tests were added.>

**Documentation:** <Describe the documentation added.>
@jj22ee jj22ee deleted the aws-cwa-dev branch October 15, 2024 18:00
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