Skip to content

Add ability to modify top level log strucutre #103

Description

@pshrote-afk

line 104 src/Sinks/AzureLogAnalytics/AzureLogAnalyticsSink.cs

Issue: Custom log structure is only available against "Event" field.

Suggestion: This package will be more flexible if log structure can be modified at the top level.

Example:

  1. Current limitation for log structure:
    [{
    "TimeGenerated": xyz,
    "Event": [{Userid: x}, {EntityId: y}, {Action: z}],
    "Message": "xyz"
    }]
var logs = logEventsBatch.Select(s =>
                {
                    var obj = new ExpandoObject() as IDictionary<string, object>;
                    obj.Add("TimeGenerated", DateTime.UtcNow);
                    obj.Add("Event", s);
                    obj.Add("Message", s.RenderMessage());
                    return obj;
                });
  1. Proposed flexibility:

[{
"TimeGenerated": xyz,
"Event": [ ],
"UserId": x,
"EntityId": y,
"Action": z,
"Message": "xyz"
}]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions