Skip to content

Conversation

@ahmagdy
Copy link

@ahmagdy ahmagdy commented Jul 5, 2019

EventHub Data will always ignore LogEvent Properties, this PR will pass and allow EventHubData to use them.
LogEvent properties can contain a lot of additional information from the program and it will be usually used with Sentry or other Serilog Sinks.

Eventhub data will always ignore logevent properties , it will be passed to eventhub data.
@adamchester
Copy link
Contributor

Hey @ahmad-magdy thanks for stopping by.

Looks like this attempts to address #9.

I think would be safer if there was a way to opt-in to adding properties.

I wonder if we can take inspiration from any other sinks that have a similar behaviour implemented?

Would you be interested in designing such a feature?

@ahmagdy
Copy link
Author

ahmagdy commented Jul 7, 2019

Hi @adamchester
Thanks.
Sure, let me take a look into it today.

ahmagdy added 2 commits July 7, 2019 22:03
Add EventDataExtension method to use logevent properties
@ahmagdy
Copy link
Author

ahmagdy commented Jul 7, 2019

@adamchester What do you think about now?
I reused Simplify method from https://github.com/serilog/serilog-sinks-azuredocumentdb/blob/master/src/Serilog.Sinks.AzureDocumentDb/Sinks/Extensions/LogEventExtensions.cs#L102
With some modification and i have tested the changes against event hub and i think it works.

@adamchester
Copy link
Contributor

@ahmad-magdy sorry for the delay in replying here.

What I meant was I think there needs to be a way to allow the user of the sink to decide which properties will be added as event hub properties and which ones will be in the payload.

I wonder if we can come up with simple way to achieve that?

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

Successfully merging this pull request may close these issues.

2 participants