logger_json icon indicating copy to clipboard operation
logger_json copied to clipboard

Add phoenix logger w/ telemetry events

Open StephaneRob opened this issue 2 years ago • 1 comments

Add ability to use telemetry events to log phoenix requests. This logger has the following options:

  • metadata_formatter default to LoggerJSON.Plug.MetadataFormatters.GoogleCloudLogger
  • version_header default to x-api-version
  • unit (only for datadog for now) to choose the unit of the duration.

StephaneRob avatar Jun 09 '23 06:06 StephaneRob

Hey @AndrewDryga, any thoughts on this? The idea is to provide a telemetry version of LoggerJSON.Plug

StephaneRob avatar Jun 20 '23 07:06 StephaneRob

Closing this for now as the library was rewritten this week to be an Erlang :logger formatted.

In the upcoming version we don't provider plugs or telemetry attaches (because that should be handled by metrics collection anyway), but anyone can attach request metadata by just adding conn to the metadata: Logger.log(..., ..., conn: conn).

AndrewDryga avatar Apr 12 '24 15:04 AndrewDryga