awslabs / awslabs/aws-embedded-metrics-java

Allow configuration of property casing convention for automatic properties

Open
#51 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
48
Forks
39
PR merge metrics
No merged PRs in 30d

Description

We automatically add some properties for each environment:

https://github.com/awslabs/aws-embedded-metrics-java/blob/9875fed95ac8f4b594597d7b896f16cb87eaa57c/src/main/java/software/amazon/cloudwatchlogs/emf/environment/LambdaEnvironment.java#L60-L65

If customers are emitting similar properties from a different LogGroup, it can be cumbersome to correlate them. For example, if the customer is using Lambda Insights (which uses snake case), they would have to query data like:

```
filter requestId = "X" or request_id = "X"
# OR
fields coalesce(requestId, request_id) as req
| filter req = "X"
```

Instead, we could offer a configuration parameter that defines the convention this library uses. For example:

```
AWS_EMF_CASE_CONVENTION=snake
```

Contributor guide

Open the contributing guide

Research direction

Start at src/main/java/software/amazon/cloudwatchlogs/emf/environment/LambdaEnvironment.java around lines 60-65 and trace how automatic properties are named and configured. Define the supported casing configuration, apply it consistently to emitted properties, and verify that snake-case output can be correlated with properties from Lambda Insights.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
observability-sre
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.