-
Notifications
You must be signed in to change notification settings - Fork 64
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
Add support for custom event writer #388
Add support for custom event writer #388
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work @sergiojrdotnet ❤️
Added one small nag I am happy to take on, let me know if you want to address it.
run docs-build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some integration test failures sadly:
Elastic.Extensions.Logging.IntegrationTests
- .LoggingToDataStreamTests.SerializesAndDeserializesMessageTemplateAndScope [FAIL]
- .LoggingToIndexTests.SerializesAndDeserializesMessageTemplateAndScope [FAIL]
- .LoggingToIndexTests.LogsEndUpInCluster [FAIL]
- .LoggingToDataStreamTests.MessageTemplateOnLogIsNotTemplatedScope [FAIL]
- .LoggingToDataStreamTests.LogsEndUpInCluster [FAIL]
Failed Elastic.Extensions.Logging.IntegrationTests.LoggingToDataStreamTests.SerializesAndDeserializesMessageTemplateAndScope [1 s]
Error Message:
Expected listener.PublishSuccess to be true because Failed publish over channel: EcsDataStreamChannel`1.
Exported Buffers: 1
Exported Items: 1
Export Responses: 0
Export Retries: 0
Export Exhausts: 0
Export Returned Items to retry: False
Inbound Buffer Read Loop Started: True
Inbound Buffer Publishes: 1
Inbound Buffer Publish Failures: 0
Outbound Buffer Read Loop Started: True
Outbound Buffer Read Loop Exited: False
Outbound Buffer Publishes: 1
Outbound Buffer Publish Failures: 0
Exception: Elastic.Transport.UnexpectedTransportException: JsonTypeInfo metadata for type 'System.String' was not provided by TypeInfoResolver of type 'Elastic.CommonSchema.Serialization.EcsJsonContext'. If using source generation, ensure that all root types passed to the serializer have been annotated with 'JsonSerializableAttribute', along with any types that might be serialized polymorphically. The unsupported member type is located on type 'Elastic.CommonSchema.Log'. Path: $.
---> System.NotSupportedException: JsonTypeInfo metadata for type 'System.String' was not provided by TypeInfoResolver of type 'Elastic.CommonSchema.Serialization.EcsJsonContext'. If using source generation, ensure that all root types passed to the serializer have been annotated with 'JsonSerializableAttribute', along with any types that might be serialized polymorphically. The unsupported member type is located on type 'Elastic.CommonSchema.Log'. Path: $.
---> System.NotSupportedException: JsonTypeInfo metadata for type 'System.String' was not provided by TypeInfoResolver of type 'Elastic.CommonSchema.Serialization.EcsJsonContext'. If using source generation, ensure that all root types passed to the serializer have been annotated with 'JsonSerializableAttribute', along with any types that might be serialized polymorphically.
It looks like there was a problem with my IDE regarding testing, so I didn’t catch the errors. I apologize for the oversight. I’m currently analyzing what happened. |
run docs-build |
Again fantastic work @sergiojrdotnet thank you so much for this contribution! |
Thanks @Mpdreamz for the speedy review. Next time I’m in Amsterdam, the coffee’s on me. |
This proposal enables users to supply their own event writers, while also honoring the serialization options they specify.
Furthermore, it introduces the capability to represent enums as strings, thereby enhancing flexibility and usability.
Generated files have been updated by Elastic.CommonSchema.Generator project