Search code examples
c#elasticsearchetw-eventsourcesemantic-loggingslab

OpCode is being attached to event name in out-of-process Semantic logging (SALB) c#


I am doing an out-of-process semantic logging with elastic search. When i browsed the events using kibana, i could see the events are coming. But the event name showing as "Event name + OpCode". That is events OpCode is being attached to the Event name.

One of my sample event is

Event(RequestStartId, Level = EventLevel.Verbose, Keywords = Keywords.Requests, Task = Tasks.Request, Opcode = EventOpcode.Start)]
public void RequestStart(string message)
{
    WriteEvent(message);
}

In elastic search(Kibana) the event name is showing as "RequestStartStart"

Is it normal behavior that the opcode is begin attached to event name ?


Solution

  • That is the built-in behavior of SLAB. You can see it defined in the EventSchema class where the EventName is the TaskName concatenated with the OpcodeName:

    public string EventName
    {
        get { return this.TaskName + this.OpcodeName; }
    }