typelevel / typelevel/natchez

Support for Associating Log Group Name with Trace in Natchez and AWS X-Ray Daemon

Open
#1,018 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
340
Forks
76
Avg merge
1d 6h
Merged PRs (30d)
13

Description

We are using Natchez for generating traces for AWS X-Ray. X-Ray allows logs to be attached to the traces being generated, provided the CloudWatch log group name is included in the traces sent to X-Ray through the daemon. However, Natchez does not currently support passing this property along with traces, and neither does the AWS X-Ray Daemon.

In the screenshot below, the log section is empty even though the logs have the trace ID and entity ID present

Screenshot from 2024-05-24 14-51-42
In the image above image log section is empty even though the logs has trace id and entityId present in the logs.

If the trace includes the following details:
"aws": {
"cloudwatch_logs": [
{
"log_group": ""
}
]
}
then logs will appear as shown below:
image

Proposed Solution:
Introduce a mechanism in Natchez to include the CloudWatch log group name in the trace annotations. Specifically, if a field named aws_group_name is present in the annotations, it should be added as the AWS CloudWatch log group in the trace.
have submitted a PR for the same.
Steps to Reproduce

  1. Use Natchez to send X-Ray traces and use the X-Ray Daemon as the collector.
  2. Add trace and span details in the logs.
    3.Verify if the CloudWatch logs are included with the trace.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the linked PR #1017 and the Natchez annotations and AWS X-Ray integration it changes. Reproduce the trace and logging steps from the issue, then verify that an aws_group_name annotation results in the CloudWatch log group appearing in the X-Ray trace.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, scala
Domain
cloud, observability
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.