Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Support passing prepared EcsDocument object to the logging API #351

Open
mrapavy opened this issue Dec 14, 2023 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@mrapavy
Copy link

mrapavy commented Dec 14, 2023

ECS integration/library project: Elastic.CommonSchema.Serilog

Is your feature request related to a problem? Please describe.
The current implementation of Elastic.CommonSchema.Serilog only supports generating EcsDocument objects on the fly from a message template. That however means that every property I want modified in the output EcsDocument object needs to be present in the message template. While this works great for simple EcsDocument objects, it doesn't scale well when I need to:

  • modify a lot properties in the generated EcsDocument object
  • include non-ECS properties that I want to have outside the $.metadata dictionary

Describe the solution you'd like
In addition to accepting MEL message template with known template properties to manipulate the generated EcsDocument (as shown here), I would like to be able to pass prepared EcsDocument object to the logging API and have Elastic.CommonSchema.Serilog library serialize it as JSON into Serilog.

Optionally (when configured so), I would also like Elastic.CommonSchema.Serilog to enrich the prepared EcsDocument object with contextual data like:

@mrapavy mrapavy added the enhancement New feature or request label Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant