I'm using the Splunk .Net logging library on Github to interface to the Splunk HTTP Event Collector.
My question is, how to set the Metadata field using the following example:
var ecSender = new HttpEventCollectorSender(new Uri("https://localhost:8088"),
"AAAAAAAAAAAAAAAAAAAAAAA",
how to set this Metadata field - I want it to be source="AppA",
HttpEventCollectorSender.SendMode.Sequential,
0,
0,
0,
middleware.Plugin
);
Thanks.
Before invoking this HttpEventCollectorSender constructor, create an object of type HttpEventCollectorEventInfo and set it's Metadata property. Details of HttpEventCollectorEventInfo class here.
The Metadata is a nested class within HttpEventCollectorEventInfo class with following attributes
public string Index { get; private set; }
public string Source { get; private set; }
public string SourceType { get; private set; }
public string Host { get; private set; }
Before invoking this HttpEventCollectorSender constructor, create an object of type HttpEventCollectorEventInfo and set it's Metadata property. Details of HttpEventCollectorEventInfo class here.
The Metadata is a nested class within HttpEventCollectorEventInfo class with following attributes
public string Index { get; private set; }
public string Source { get; private set; }
public string SourceType { get; private set; }
public string Host { get; private set; }
MetaData property are read-only says it when i try to initialize, Could you share code please?