question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Consider allowing the ability to opt-out of distributed tracing for expected HTTP error responses

See original GitHub issue

Summary

In some situations, service calls return an HTTP response code in the range normally interpreted as an exception though that response is an expected and normal scenario to the consumer of the associated client library. For example, when using an If-Match constraint with the Storage client library when updating metadata for a blob, a mismatch in the ETag results in an HTTP 412 (Precondition Failed) response.

While this status code is semantically correct, it is also considered an expected and normal scenario to some callers. For example, the Event Processor client library will attempt to claim ownership of a partition by making a conditional request. Since multiple processor instances are competing for ownership, it is expected that the conditional request will not succeed for the majority of them. In this case, the Event Hubs client handles the resulting storage exception and considers it as part of the normal application path.

However, within the Storage client, the diagnostics scope considers the request a failure an emits the associated exception data. When customers using the Event Hubs processor are integrating with Application Insights, they are seeing diagnostics information that indicates errors in their application, though these entries are not indicating actual problems and are just noise.

It may be worth considering if we wanted to include a feature that would allow consumers of a client library to declare expected response failures as such and avoid emitting error diagnostics for them.

Related Items

  • [BUG] Event Hub Processor Host - creating errors when checkpointing to blob (#9908)

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:4
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

4reactions
Archomedacommented, Apr 8, 2022

Is there any progress on this? Seeing that this issue has existed for 2 years makes me kinda sad.

I hook into the ILogger for some custom log targets, and I get this noise as well which is incredibly annoying.

1reaction
annelo-msftcommented, Jan 11, 2023

Hi @Archomeda - you’re correct that this is only implemented in Azure.Data.Tables currently. As I understand it, this issue tracks the work to incorporate the feature in the Storage libraries. @seanmcc-msft is driving that work. My understanding of the process is that the client feature crew will work with architects to determine how to expose this functionality on those libraries. They do have the option to expose the RequestContext directly to give callers full control of the pipeline on a per-request basis.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Distributed tracing and telemetry correlation in Azure ...
The Application Insights data model defines two fields to solve this problem: request.source and dependency.target . The first field identifies ...
Read more >
Distributed tracing: Planning guide
Determine the requests that are the most important for your business, or the most likely to require analysis and troubleshooting, and enable distributed...
Read more >
OpenTelemetry Tracing: Everything you need to know
Distributed tracing plays a crucial role in this process, providing a robust method to trace the flow of requests and responses across different...
Read more >
Distributed Tracing Working Group Charter
Join the Distributed Tracing Working Group. See the group status page and detailed change history. Teleconferences: 1-hour team calls will be held bi-weekly....
Read more >
Distributed Tracing: All you need to know to get started
Distributed tracing is a method for tracking all the operations within a distributed system that have been triggered by a specific request.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found