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/awss3] add marsheler config to pick only body content of logs #30318

Merged

Conversation

anthoai97
Copy link
Contributor

@anthoai97 anthoai97 commented Jan 6, 2024

Description:

This pull request introduces a new marshaller for the awss3 exporter. It disregards resources, labels, and selectively extracts only the body content of the logs, facilitating simplified AWS Athena connection and querying. While straightforward, this enhancement accommodates various use cases, enabling the extraction of specific logs for statistical analysis and long-term archival reporting.

Example when write only body to S3:

EXTERNAL_REQUEST 2023-07-18T10:05:01.976Z GET 200 localhost /organization/v0/properties 0:0:0:0:0:0:0:1 4264 348 wUN0NeTMByHVmIOjo79ImwylAjjkRtkr
EXTERNAL_REQUEST 2023-07-18T10:05:01.976Z GET 200 localhost /organization/v0/properties 0:0:0:0:0:0:0:1 4264 348 wUN0NeTMByHVmIOjo79ImwylAjjkRtkr
EXTERNAL_REQUEST 2023-07-18T10:05:01.976Z GET 200 localhost /organization/v0/properties 0:0:0:0:0:0:0:1 4264 348 wUN0NeTMByHVmIOjo79ImwylAjjkRtkr
EXTERNAL_REQUEST 2023-07-18T10:05:01.976Z GET 200 localhost /organization/v0/properties 0:0:0:0:0:0:0:1 4264 348 wUN0NeTMByHVmIOjo79ImwylAjjkRtkr

Testing:
Work as expected when used Athena to Query:
athena

Documentation:
Readme updated.

@anthoai97 anthoai97 requested review from atoulme and a team as code owners January 6, 2024 14:30
Copy link

linux-foundation-easycla bot commented Jan 6, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: anthoai97 / name: An Quách (6a1cdc5)

@atoulme
Copy link
Contributor

atoulme commented Jan 6, 2024

Please rebase

@anthoai97 anthoai97 force-pushed the feat/allow_pick_only_log_body branch from 5701888 to 657be70 Compare January 6, 2024 18:09
@anthoai97
Copy link
Contributor Author

Please rebase

@atoulme i'm rebased, thank you !!!

@anthoai97 anthoai97 force-pushed the feat/allow_pick_only_log_body branch from 657be70 to afe0686 Compare January 6, 2024 18:24
@anthoai97 anthoai97 force-pushed the feat/allow_pick_only_log_body branch from afe0686 to ac36610 Compare January 6, 2024 19:50
@anthoai97 anthoai97 force-pushed the feat/allow_pick_only_log_body branch from ac36610 to 63a4451 Compare January 9, 2024 08:59
@atoulme
Copy link
Contributor

atoulme commented Jan 10, 2024

Thank you, this looks good. A last nit on the changelog note and I am ready to accept the PR.

@anthoai97 anthoai97 force-pushed the feat/allow_pick_only_log_body branch from 63a4451 to 0376f6e Compare January 11, 2024 03:16
@anthoai97
Copy link
Contributor Author

Thank you, this looks good. A last nit on the changelog note and I am ready to accept the PR.

I'm pleased to hear that. I updated the changelog and changed the variable name to pass the lint workflow. Thank you.

@anthoai97
Copy link
Contributor Author

Hi @atoulme, could you please guide the steps I need to take to merge into the 'main' branch? Are there any specific requirements or actions I should be aware of?

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Jan 29, 2024
Copy link
Contributor

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Feb 12, 2024
@atoulme atoulme reopened this Feb 12, 2024
@atoulme
Copy link
Contributor

atoulme commented Feb 12, 2024

Sorry, please rebase and I can flag for maintainers to take a look.

@anthoai97 anthoai97 force-pushed the feat/allow_pick_only_log_body branch 3 times, most recently from 30fe786 to c3d8cbd Compare February 12, 2024 15:52
@anthoai97
Copy link
Contributor Author

Dear @atoulme, I have rebased the branch, but unfortunately, I made a mistake during the process which added many reviewers to the review list. Could you please advise me on how to resolve this issue?

Thank you very much !!!

@atoulme atoulme added the ready to merge Code review completed; ready to merge by maintainers label Feb 13, 2024
@yurishkuro yurishkuro removed their request for review February 13, 2024 17:26
@dmitryax dmitryax merged commit a308867 into open-telemetry:main Feb 13, 2024
147 checks passed
@github-actions github-actions bot added this to the next release milestone Feb 13, 2024
XinRanZhAWS pushed a commit to XinRanZhAWS/opentelemetry-collector-contrib that referenced this pull request Mar 13, 2024
…gs (open-telemetry#30318)

**Description:** <Describe what has changed.>
This pull request introduces a new marshaller for the awss3 exporter. It
disregards resources, labels, and selectively extracts only the body
content of the logs, facilitating simplified AWS Athena connection and
querying. While straightforward, this enhancement accommodates various
use cases, enabling the extraction of specific logs for statistical
analysis and long-term archival reporting.

Example when write only body to S3:
```
EXTERNAL_REQUEST 2023-07-18T10:05:01.976Z GET 200 localhost /organization/v0/properties 0:0:0:0:0:0:0:1 4264 348 wUN0NeTMByHVmIOjo79ImwylAjjkRtkr
EXTERNAL_REQUEST 2023-07-18T10:05:01.976Z GET 200 localhost /organization/v0/properties 0:0:0:0:0:0:0:1 4264 348 wUN0NeTMByHVmIOjo79ImwylAjjkRtkr
EXTERNAL_REQUEST 2023-07-18T10:05:01.976Z GET 200 localhost /organization/v0/properties 0:0:0:0:0:0:0:1 4264 348 wUN0NeTMByHVmIOjo79ImwylAjjkRtkr
EXTERNAL_REQUEST 2023-07-18T10:05:01.976Z GET 200 localhost /organization/v0/properties 0:0:0:0:0:0:0:1 4264 348 wUN0NeTMByHVmIOjo79ImwylAjjkRtkr
```

**Testing:**
Work as expected when used Athena to Query:
<img width="962" alt="athena"
src="https://github.com/open-telemetry/opentelemetry-collector-contrib/assets/85854989/8f682024-df4e-402b-9de1-ee8268ea1936">
nslaughter pushed a commit to nslaughter/opentelemetry-collector-contrib that referenced this pull request May 23, 2024
…gs (open-telemetry#30318)

**Description:** <Describe what has changed.>
This pull request introduces a new marshaller for the awss3 exporter. It
disregards resources, labels, and selectively extracts only the body
content of the logs, facilitating simplified AWS Athena connection and
querying. While straightforward, this enhancement accommodates various
use cases, enabling the extraction of specific logs for statistical
analysis and long-term archival reporting.

Example when write only body to S3:
```
EXTERNAL_REQUEST 2023-07-18T10:05:01.976Z GET 200 localhost /organization/v0/properties 0:0:0:0:0:0:0:1 4264 348 wUN0NeTMByHVmIOjo79ImwylAjjkRtkr
EXTERNAL_REQUEST 2023-07-18T10:05:01.976Z GET 200 localhost /organization/v0/properties 0:0:0:0:0:0:0:1 4264 348 wUN0NeTMByHVmIOjo79ImwylAjjkRtkr
EXTERNAL_REQUEST 2023-07-18T10:05:01.976Z GET 200 localhost /organization/v0/properties 0:0:0:0:0:0:0:1 4264 348 wUN0NeTMByHVmIOjo79ImwylAjjkRtkr
EXTERNAL_REQUEST 2023-07-18T10:05:01.976Z GET 200 localhost /organization/v0/properties 0:0:0:0:0:0:0:1 4264 348 wUN0NeTMByHVmIOjo79ImwylAjjkRtkr
```

**Testing:**
Work as expected when used Athena to Query:
<img width="962" alt="athena"
src="https://github.com/open-telemetry/opentelemetry-collector-contrib/assets/85854989/8f682024-df4e-402b-9de1-ee8268ea1936">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exporter/awss3 ready to merge Code review completed; ready to merge by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants