-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat: enhance CloudTrail log encoder with extra attributes #43584
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
feat: enhance CloudTrail log encoder with extra attributes #43584
Conversation
46d3469 to
a82f1c9
Compare
|
@axw @constanca-m appreciate a review. Also let me know if the choice of attribute names looks fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good apart from one thing, thanks for the contribution!
extension/encoding/awslogsencodingextension/internal/unmarshaler/cloudtraillog/unmarshaler.go
Outdated
Show resolved
Hide resolved
Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
e2d9102 to
1c85554
Compare
Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Kavindu-Dodan!
Co-authored-by: Andrew Wilkins <axwalk@gmail.com>
3b256b5 to
571a59f
Compare
Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>
571a59f to
f342760
Compare
|
Thank you for your contribution @Kavindu-Dodan! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey. If you are getting started contributing, you can also join the CNCF Slack channel #opentelemetry-new-contributors to ask for guidance and get help. |
Description
Enhance the CloudTrail log encoder by adding additional/missing fields. Given below are new fields and their mappings,
apiVersionaws.cloudtrail.api_versionadditionalEventDataaws.additional_event_data(map of all additional event data)userIdentity.accountIdaws.user_identity.account_iduserIdentity.invokedByaws.user_identity.invoked_byuserIdentity.sessionContext.attributes.creationDateaws.user_identity.session_context.attributes.creation_dateuserIdentity.sessionContext.attributes.mfaAuthenticatedaws.user_identity.session_context.attributes.mfa_authenticateduserIdentity.sessionContext.sessionIssuer.typeaws.user_identity.session_context.issuer.typeuserIdentity.sessionContext.sessionIssuer.principalIdaws.user_identity.session_context.issuer.principal_iduserIdentity.sessionContext.sessionIssuer.arnaws.user_identity.session_context.issuer.arnuserIdentity.sessionContext.sessionIssuer.accountIdaws.user_identity.session_context.issuer.account_iduserIdentity.sessionContext.sessionIssuer.userNameaws.user_identity.session_context.issuer.user_nameOfficial documentation links to refer details on these fields,
apiVersion: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-record-contents.htmladditionalEventData: https://docs.aws.amazon.com/singlesignon/latest/userguide/sign-in-events-examples.htmluserIdentity.invokedBy: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/non-api-aws-service-events.htmluserIdentity.sessionContext: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-user-identity.htmlLink to tracking issue
Completes first part of #43403
Testing
Validated the parsing with publicly available AWS CloudWatch logs. Further added additional logs for end-to-end validation.
Documentation
Updated Original to OTel log attributes table of the documentation.