Open cohenjw opened 2 years ago
@cohenjw I THINK what you're asking is possible. It's possible to specify CorrelationId
as the name/value pair you're looking for during insert using this sink. Basically you'd use your own IPartitionKeyProvider
and specify the name of the partitionKey
as CorrelationId
.
Check out something similar implemented in my fork:
I'm having an issue figuring out if it's possible to pull a property of of the
Properties
object and push it into the root of the object, in effort to set this property as my partition key.I would like this because EF Core currently doesn't support the nested partition key (https://github.com/dotnet/efcore/issues/26978)
{ "Properties": { "CorrelationId": "d26b41bd-d107-4f29-955a-68ea5c572f45" }, "UtcDate": "01.07.2022" }
(snipped down for brevity)Where
UtcDate
is the current partition key, by default. I would like to bringCorrelationId
out of the properties object, and into the root so that I can tell EF Core thatCorrelationId
is the new partition key. I cannot find anything in the Serilog or Cosmos sink docs that may allow me to do this.Thank you!