Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Enable setting properties to enrich the emf records emitted by EmfMetricLoggingPublisher #6595

Copy link
Copy link
@humanzz

Description

@humanzz
Issue body actions

Describe the feature

Enable EmfMetricLoggingPublisher to optionally accept a Supplier<Map<String, String>> that it uses to add properties/metadata to the emf records.

Use Case

Prior to the introduction of EmfMetricLoggingPublisher, I implement a custom emf publisher (#2068 (comment)) to use in my lambda functions.

Now looking to move to the SDK-provided EmfMetricLoggingPublisher, I'm realizing there's a gap. In my custom publisher, I enriched the emf record with some additional metadata like function request id, and other properties to enable emf record analysis/correlation with function invocations.

EmfMetricLoggingPublisher provides no way to interact with the generated emf records and from the implementation I see it's a custom implementation.

I believe the ability to enrich emf records, with identifiers/properties to facilitate investigations/correlating with other metadata is a good practice.

Proposed Solution

The proposal is to update EmfMetricLoggingPublisher.builder() to accept a .propertiesSupplier(...) that takes a Supplier<Map<String, String>> to add as properties - equivalent to https://github.com/awslabs/aws-embedded-metrics-java/blob/master/src/main/java/software/amazon/cloudwatchlogs/emf/logger/MetricsLogger.java#L110

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

AWS Java SDK version used

2.39.5

JDK version used

25

Operating System and version

Amazon Linux 2023

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestA feature should be added or improved.A feature should be added or improved.needs-triageThis issue or PR still needs to be triaged.This issue or PR still needs to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.