Event Log Web Event Task Category ID - windows-server-2008-r2

Can anyone tell me what the Task Category ID is for a Web Event used in the Event Viewer?
_eventLog.WriteEntry(eventText, EventLogEntryType.Warning, 1001, [value for web event]);

Related

Bots being stuck in reserved state in storage

This happened in EIL on 12/13/2021:
realtime
None of the bots had jobs, confirmed on bot dashboard:
dashboard
Apparently a message was lost because there was a K8s upgrade going on and 3 pods were mistakenly called by ops to maintenance. Dispatch had requests still in progress for moving each pod/bot into storage. The solution in this case was the following:
I. Confirm the request still in progress and bot assignation still exist for each bot:
SELECT JobId FROM [iHerb_Scs_Wes_Agv_Dispatch].[request].[Requests]
WHERE Id = (SELECT RequestId FROM[iHerb_Scs_Wes_Agv_Dispatch].[dispatch].[BotAssignments] WHERE BotId = 'c45766cb-21e7-4a91-a509-017cf0e38580')
II. Emit FleetJobCompleted event for each bot, using job id found out on previous step:
https://rabbit-cluster-scs-prod.iherbscs.net/#/queues/scs.wes.agv.dispatch/FleetJobCompleted
{
"JobId" : "EA5E165F-0A72-428B-9B2A-017DB3216120"
}

Azure Microservices Performance Insights - Collective Performance Counter Reporting

I have around 10 microservice applications in .net, all hosted on Azure ServiceFabric.
These applications are setup in a sequence for example
API call to Application 1 > stores data in cosmos > sends message to Application 2
Application 2 > Depending on data and business logic send a message to relative department (application 3, 4, 5, etc)
Application 3 processes and stores the data in database
I want a performance metric which shows some start/end time or total time taken to perform 1 End to End cycle for a payload.
I have come through certain solutions for tihs
Log metrics in Application Insights before and after method calls
Example:
Create and use a unique Guid as correlationId
Application 1 > Method1() - Record Start Time
Application 1 > Method() - Record start and end time
Application 3 > Method2() - Record start and end time
Application 3 > Method2() - Record End Time
This is available in Insights when I search for that Guid
Even here I have a question how could I improve the visibility of this, maybe charts, reports, what options I could use in Application Insights?
Log as above but in a separate database, this way we have control on data (application insights have huge data and cant be a separate API)
Create a new API with input as Guid, the response will be seomthing like below
Total EndToEnd Time: 10seconds
Application1> Method2(): 2 seconds
...
I know there could be better options but need some direction on this please.
There are two options to do it with Application Insights. Both are not ideal at this point.
Option I. If you store all telemetry in the same resource and your app doesn't have too much load then you can group by (summarize) by CorrelationId. Here is an idea (you might want to extend it by recording start time when it comes to Application 1 and end time when it comes to Application 3):
let Source = datatable(RoleName:string, CorrelationId:string, Timestamp:datetime)
[
'Application 1', '1', '2021-04-22T05:00:45.237Z',
'Application 2', '1', '2021-04-22T05:01:45.237Z',
'Application 3', '1', '2021-04-22T05:02:45.237Z',
'Application 1', '2', '2021-04-22T05:00:45.237Z',
'Application 2', '2', '2021-04-22T05:01:46.237Z',
'Application 3', '2', '2021-04-22T05:02:47.237Z',
];
Source
| summarize min_timestamp=min(Timestamp), max_timestamp=max(Timestamp) by CorrelationId
| extend duration = max_timestamp - min_timestamp
| project CorrelationId, duration
Option II. Application Insights supports W3C standard of Distributed Tracing for HTTPS calls. If you manually propagate distributed tracing context through your message (between applications) and restore this context, then you can do the following:
In Application 1 you can put start time in a Baggage
This field will get propagated across applications [note, OperationId will also propagate]
In Application N you will know exactly when a particular request/transaction started, so you will be able to emit proper metric

Application Insights log: search by Information content

I want to search Application Insights logs by messages inside. For example, I have the following log:
I want to search all calls, when message: 'FunctionCallEfsApi no messages' consists...
How can I do it?
If you are looking inside traces or exceptions inside Application Insights, you can use following query to get all messages when message contains : 'FunctionCallEfsApi no messages'
traces | where message contains "FunctionCallEfsApi no messages"
You can navigate to Logs(Analytics) on Application Insights resource you have and write a query to fetch those information,
traces
| where message contains "FunctionCallEfsApi no messages"

Reserved EventIds in ApplicationInsights

I am creating some LogError calls in my ASP.NET Core webapp on the line of
_logger.LogError(new EventId(5000,"CustomName"),"description");``
I can find this event in Application Insights by querying like this
traces | where timestamp > ago(10m) |where customDimensions.EventId == 5000
Is there any list of event ids that is reserved? I only want to get my own events. I know that a third party library that i bind to my project theoretically can write some events with the above event id, but I am thinking more if Microsoft has a list of reserved event ids. If I do this search in my log
traces | where timestamp > ago(10m) |where customDimensions.EventId > 1
I get some hits, on Azure Function startup, so I know that Microsoft are using this also.
I have searched the docs, but haven't found any list.
No, there're no reserved EventIDs in app insights. You always need to provide it by yourself.

start workflow 13 on event receiver item attached

I am using the same code to trigger 13 workflow form item attachment event receiver ,but i am getting null in (SPWorkflowAssociation associationTemplate) in case of 13 workflow template ,while successfully able to trigger 10 workflow template.
Can u please guide this isssue?.

Resources