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

Low level client exception structure should match SimpleJson #3656

Closed
russcam opened this issue Apr 10, 2019 · 2 comments
Closed

Low level client exception structure should match SimpleJson #3656

russcam opened this issue Apr 10, 2019 · 2 comments

Comments

@russcam
Copy link
Contributor

russcam commented Apr 10, 2019

With the move to utf8json in #3493, we should ensure that the serialized structured of an exception in the low level client matches that of SimpleJson, the preceding low level client serializer.

This may also be an opportunity to create a better exception structure, to support indexing into Elasticsearch and other logging systems.

@Mpdreamz
Copy link
Member

we created a custom strategy for exceptions for SimpleJson:

https://github.com/elastic/elasticsearch-net/blob/6.x/src/Elasticsearch.Net/Serialization/ElasticsearchNetJsonStrategy.cs

So we need to match that one not SimpleJson default behaviour.

This strategy closely mimics what https://github.com/serilog/serilog-sinks-elasticsearch does when I submitted this PR for its 2.0 serilog-contrib/serilog-sinks-elasticsearch#1

We should definitely learn from what has happened on that repos since, lotsa great options and different outputs for different usecases. Even different usecases within just Kibana.

I would love long term for us to maintain a dependency free Elastic.ExceptionSerializer that takes a stream to write to. I can see many usecases for this see also e.g: serilog-contrib/serilog-sinks-elasticsearch#224. The learnings from that could be applied to ship a dependency free ECS mapping 😄

For the initial 7.0.0-alpha feature parity with ElasticsearchNetJsonStrategy would be enough though.

cc @mivano

russcam added a commit that referenced this issue Apr 11, 2019
This commit introduces an ExceptionFormatters that serializes exceptions
to the same structure as that used in 6.x

Fixes #3656
russcam added a commit that referenced this issue Apr 11, 2019
…#3662)

This commit introduces an ExceptionFormatters that serializes exceptions
to the same structure as that used in 6.x

Fixes #3656
@russcam
Copy link
Contributor Author

russcam commented Apr 12, 2019

Closing this as #3662 has been merged into 7.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants