powertools-lambda-typescript icon indicating copy to clipboard operation
powertools-lambda-typescript copied to clipboard

Feature Request - add support to other observability providers

Open caioquirino opened this issue 3 years ago • 4 comments

[!note] See this comment for latest status update. If you're interested in seeing this come to fruition, please consider adding a 👍 to this issue.


Description of the feature request

Problem statement We have used the js version of lambda-powertools for a long time already in DAZN, and now we have most of the Back-end teams working with typescript instead of javascript directly. With that said, the interest in adopting this project is really high, and it is useful for many areas already. In order to make the best adoption of this amazing tool in DAZN, it would be great if we could either configure it to use New Relic instead of Cloudwatch, or extend it with our own implementation, so we could keep it self-contained in a single repository.

Currently we are using New Relic for both logging, metrics and tracing in practically all the services in DAZN.

Summary of the feature Provide a way to configure or extend this tools for external providers (New Relic)

Example suggestions:

Logger options:

  • Add correspondent middlewares for New Relic
  • Propose a way to configure the middlewares to use a New Relic implementation
  • Add some extensibility in the Logger so it's possible to override the printLog function (or something like that) or provide an alternative implementation to the Logger class

Metrics options:

  • Add correspondent middlewares for New Relic
  • Propose a way to configure the middlewares to use a New Relic Implementation
  • Add the ability to provide an alternative implementation to the Metrics class

Tracing options:

  • Add correspondent middlewares for New Relic
  • Propose a way to configure the middlewares to use a New Relic Implementation
  • Add the ability to provide an alternative implementation to the Tracer class

Code examples To be defined

Benefits for you and the wider AWS community Developers that needs to use New Relic or any other observability provider are able to use this project

Describe alternatives you've considered It's briefly documented in the Summary, still needs more understanding of which options are possible

Additional context

Related issues, RFCs

https://github.com/awslabs/aws-lambda-powertools-python/issues/1433

caioquirino avatar Mar 09 '22 18:03 caioquirino

Hi @caioquirino thank you for opening this issue and formalizing the request!

As we have mentioned during our meeting with the Backend Guild this is something that we are keen to consider.

Please allow us some time to discuss this internally and we'll be back to you and the team.

dreamorosi avatar Mar 09 '22 22:03 dreamorosi

Thanks for opening this issue @caioquirino!

saragerion avatar Mar 10 '22 08:03 saragerion

Hi everyone, we have started working on a RFC for this topic and the first tests are showing that we might be able to support 3rd party observability providers by allowing you to fully customize the log formatter used to emit logs.

If you're interested in reading the current proposal and leaving your feedback please do so at #1500.

dreamorosi avatar Jun 20 '23 18:06 dreamorosi