0

I've previously asked a question about specific telemetry sampling where one can discard 10% of the successful calls.

Turns out that dependencies need to be treated separately. Filtering out most of the successful dependencies will probably lead to a loss of information about failures/exceptions.

Is there any way to know if a dependency belongs to an exception or to cluster Telemetry items that belong together?

Edit: Apparently there is a 'successful call' property. But not much info can be found about it. Does it mean that the dependency itself has failed or that the original call failed?

Wouter
  • 154
  • 17

2 Answers2

0

Telemetry that goes together should have the same operation_Id, so if you're looking for a way to group things together (like the end to end details view does), you'd want to look at operation_Ids.

ideally, you'll have an inbound request, which sets the operation_Id/operation_Name context, and then everything that happened inside that request, including logs, dependencies, exceptions, events, metrics, etc, would all have the same operation_Id value and can be found together.

Successful call on the dependency indicates that specific "outbound" request succeeded. You could still have requests that succeed even if dependencies inside that request failed, or vice-versa, depending on how your system works.

The only "gotcha" here is if you are using async. In those cases, when the async code actually runs, it might not have access to the request that is/was running when the async code was initiated. in those cases, you might have to do extra work yourself to make sure that operation context gets passed around through your async code properly.

John Gardner
  • 24,225
  • 5
  • 58
  • 76
  • That makes sense. So, the only way to know if a dependency is related to an exception is to keep track of all exceptions and store their operation_Ids somewhere? – Wouter Apr 25 '19 at 06:35
  • if you're using application insights, aren't you already tracking exception telemetry? those would also already have the operation ids set. (`exceptions` is one table of telemetry, `dependencies` is a table of telemetry, `requests` is a table of telemetry, etc. if you're using requests and dependencies, you might already be using exceptions as well – John Gardner Apr 25 '19 at 19:41
  • Yes, but by discarding dependencies, won't I be discarding useful information on the exceptions? – Wouter Apr 26 '19 at 09:05
  • who's discarding dependencies? like Cijo said, sampling tries to keep everything in an operation_Id together. if you have an exception, everything that occurred in that operation should get sampled in, not discarded. – John Gardner Apr 26 '19 at 17:43
  • That's my question. The some of the ITelemetry items in the ITelemetryProcessor are dependencies. Can I discard them without losing information about the exceptions? – Wouter Apr 30 '19 at 07:18
0

Is there any way to know if a dependency belongs to an exception or to cluster Telemetry items that belong together?

You can use operation_id to find all telemetry from a single operation. However you probably don't need it, as default sampling either keeps or discards all Telemetry from a single operation (i.e same operation_id).

So if your request failed, and that telemetry is captured by application insights, and sampling decides to send this Request, then all the related telemetry, including exceptions, dependencies will also be retained.

cijothomas
  • 2,818
  • 1
  • 13
  • 25