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 #26553

Merged
merged 5 commits into from
Sep 14, 2023

Conversation

jj22ee
Copy link
Contributor

@jj22ee jj22ee commented Sep 8, 2023

Description:

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:
N/A

Testing:
Updated Unit tests.

Local testing:
Used Golang OTel instrumented sample app
Built the ADOT Collector locally with the timestamp check removal change, 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:
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.

@jj22ee jj22ee marked this pull request as ready for review September 8, 2023 21:47
@jj22ee jj22ee requested review from a team and bogdandrutu September 8, 2023 21:47
exporter/awsxrayexporter/awsxray_test.go Outdated Show resolved Hide resolved
@jj22ee jj22ee changed the title Change exporter.awsxray.skiptimestampvalidation feature gate from Alpha to Beta [exporter/awsxray] Change exporter.awsxray.skiptimestampvalidation feature gate from Alpha to Beta Sep 12, 2023
@jj22ee
Copy link
Contributor Author

jj22ee commented Sep 13, 2023

@bogdandrutu @djaglowski pinging for approval and merge

@Aneurysm9 Aneurysm9 added the ready to merge Code review completed; ready to merge by maintainers label Sep 14, 2023
@codeboten codeboten merged commit 403626b into open-telemetry:main Sep 14, 2023
95 checks passed
@github-actions github-actions bot added this to the next release milestone Sep 14, 2023
jj22ee added a commit to jj22ee/opentelemetry-collector-contrib that referenced this pull request Sep 21, 2023
…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]>
jj22ee added a commit to jj22ee/opentelemetry-collector-contrib that referenced this pull request Sep 21, 2023
…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]>
jj22ee added a commit to jj22ee/opentelemetry-collector-contrib that referenced this pull request Sep 21, 2023
…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]>
jj22ee added a commit to jj22ee/opentelemetry-collector-contrib that referenced this pull request Sep 22, 2023
…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]>
sky333999 pushed a commit to amazon-contributing/opentelemetry-collector-contrib that referenced this pull request Sep 25, 2023
…ature gate from Alpha to Beta (open-telemetry#26553) (#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.>
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.>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exporter/awsxray ready to merge Code review completed; ready to merge by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants