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

lambda-promtail: cloudwatch: add '__aws_log_type' label #11335

Conversation

elliotdobson
Copy link
Contributor

@elliotdobson elliotdobson commented Nov 29, 2023

What this PR does / why we need it:

Adds the __aws_log_type label to AWS CloudWatch logs in lambda-promtail.

Which issue(s) this PR fixes:

N/A

Special notes for your reviewer:

AWS S3 & Kinesis log types already have this label. The lambda-promtail documentation here suggests that CloudWatch logs has this label added as well, but in practice it does not AFAICT.

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • CHANGELOG.md updated
    • If the change is worth mentioning in the release notes, add add-to-release-notes label
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • For Helm chart changes bump the Helm chart version in production/helm/loki/Chart.yaml and update production/helm/loki/CHANGELOG.md and production/helm/loki/README.md. Example PR
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR

@elliotdobson elliotdobson requested a review from a team as a code owner November 29, 2023 01:28
Copy link
Contributor

Trivy scan found the following vulnerabilities:

@cstyan
Copy link
Contributor

cstyan commented Dec 4, 2023

@elliotdobson thanks, looks like this got lost via some refactoring that split the different AWS product logs parsing up into different files. Can you add a simple test that ensures that those three labels are always present when we parse a cloudwatch log please.

@cstyan cstyan self-assigned this Dec 4, 2023
@pull-request-size pull-request-size bot added size/M and removed size/XS labels Dec 4, 2023
@elliotdobson
Copy link
Contributor Author

@cstyan done. Should be good for review now.

Copy link
Contributor

@cstyan cstyan left a comment

Choose a reason for hiding this comment

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

just waiting to confirm build is still green

@cstyan
Copy link
Contributor

cstyan commented Dec 6, 2023

@elliotdobson thanks 👍

@cstyan cstyan merged commit 0945b18 into grafana:main Dec 6, 2023
7 checks passed
@elliotdobson elliotdobson deleted the lambda-promtail-cloudwatch-aws-log-type-label branch December 8, 2023 01:42
rhnasc pushed a commit to inloco/loki that referenced this pull request Apr 12, 2024
**What this PR does / why we need it**:

Adds the `__aws_log_type` label to AWS CloudWatch logs in
`lambda-promtail`.

**Which issue(s) this PR fixes**:

N/A

**Special notes for your reviewer**:

AWS S3 & Kinesis log types already have this label. The
`lambda-promtail` documentation
[here](https://github.com/grafana/loki/blob/main/docs/sources/send-data/lambda-promtail/_index.md?plain=1#L154)
suggests that CloudWatch logs has this label added as well, but in
practice it does not AFAICT.

**Checklist**
- [x] Reviewed the
[`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md)
guide (**required**)
- [ ] Documentation added
- [x] Tests updated
- [ ] `CHANGELOG.md` updated
- [ ] If the change is worth mentioning in the release notes, add
`add-to-release-notes` label
- [ ] Changes that require user attention or interaction to upgrade are
documented in `docs/sources/setup/upgrade/_index.md`
- [ ] For Helm chart changes bump the Helm chart version in
`production/helm/loki/Chart.yaml` and update
`production/helm/loki/CHANGELOG.md` and
`production/helm/loki/README.md`. [Example
PR](grafana@d10549e)
- [ ] If the change is deprecating or removing a configuration option,
update the `deprecated-config.yaml` and `deleted-config.yaml` files
respectively in the `tools/deprecated-config-checker` directory.
[Example
PR](grafana@0d4416a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants