semantic-conventions icon indicating copy to clipboard operation
semantic-conventions copied to clipboard

Add .NET network + HTTP connection spans

Open lmolkova opened this issue 1 year ago • 6 comments
trafficstars

This PR introduces additional network-level spans to-be emitted by .NET 9 🤞

Related to #454, https://github.com/open-telemetry/semantic-conventions/issues/1226

In particular:

  1. DNS, TLS, and socket connect spans that track individual stages of connection establishment
  2. wrapper HTTP connection setup span for above spans
  3. wait-for-connection span that signals when a connection is not immediately available for the request
    • link that connects wait-for-connection to the connection setup
    • is expected to be off by default
    • [x] TODO: document that it should be opt-in.

On .NET every ActivitySource (aka tracer) is opt-in, so users have full control over what they are enabling.

The volume of new telemetry is expected to be low (with caveats):

  • The connection-level spans (groups 1 and 2 above) are rare - connections are created rarely.
  • Wait-for-connection spans are only reported when connection is not readily available and would be present when connection pool is overloaded.
  • Links to connection setup are most concerning since we don't know how backends are handling incoming links. See https://github.com/open-telemetry/opentelemetry-specification/discussions/4130 for the context. This is off by default docs)?
image

Overall, the feature is intended to help debug issues like:

  • misconfigured connection pool
  • DNS/TLS
  • abandoned response streams (or slow response stream reading) that result in connection staying busy
  • ...

lmolkova avatar Jun 27 '24 23:06 lmolkova

@trustin @swankjesse @minwoox I know this is a tall order, but I'll ask anyway since years ago you all had helped with this and led to zipkin annotations or otherwise.

Do you have some cycles to review otel semantics (aka data recording conventions like tag names which are called attributes in otelngish)? I know you have all very deep work in interception and lifecycle of HTTP and there are some subtleties here which are more than meets the eye 🤖

codefromthecrypt avatar Jul 26 '24 07:07 codefromthecrypt

This PR was marked stale due to lack of activity. It will be closed in 7 days.

github-actions[bot] avatar Aug 11 '24 03:08 github-actions[bot]

This PR was marked stale due to lack of activity. It will be closed in 7 days.

github-actions[bot] avatar Aug 27 '24 03:08 github-actions[bot]

Closed as inactive. Feel free to reopen if this PR is still being worked on.

github-actions[bot] avatar Sep 03 '24 03:09 github-actions[bot]

@antonfirsov could you please review and approve if it aligns with the implementation? Thanks!

lmolkova avatar Sep 03 '24 03:09 lmolkova

This PR was marked stale due to lack of activity. It will be closed in 7 days.

github-actions[bot] avatar Oct 04 '24 03:10 github-actions[bot]

This PR was marked stale due to lack of activity. It will be closed in 7 days.

github-actions[bot] avatar Oct 20 '24 03:10 github-actions[bot]

@antonfirsov I think I addressed you comments (all except listing error codes), could you please take another look?

lmolkova avatar Dec 10 '24 07:12 lmolkova