Git Product home page Git Product logo

Comments (4)

cijothomas avatar cijothomas commented on July 2, 2024 1

I see you are asking if the asp.net core instrumentation should do this by default, without having to write the Enrich? Then the answer is generally no, as the instrumentation follows otel conventions, and there isn't anything about "cancellation requested". It is possible to propose something to the Otel Semantic Conventions group, but its usually accepted for very common things. Your best bet would likely be to do such customizations via Enrich itself.

from opentelemetry-dotnet.

cijothomas avatar cijothomas commented on July 2, 2024

Can you clarify the ask some more?

from opentelemetry-dotnet.

cliedeman avatar cliedeman commented on July 2, 2024

Sure.

Here is an example of how we could do it with enrich.

                    .AddAspNetCoreInstrumentation(opts =>
                    {
                        opts.Enrich = (string _, HttpContext context, ref TagList tags) =>
                        {
                            tags.Add("cancelled", context.RequestAborted.IsCancellationRequested);
                        };
                    })

from opentelemetry-dotnet.

cliedeman avatar cliedeman commented on July 2, 2024

thanks @cijothomas that makes sense.

I looked around in the semantic conventions at this PR and this open issue

https://opentelemetry.io/docs/specs/semconv/http/http-spans/#common-attributes

According to the docs for error.type we could stipulate timeout or requestAborted in the error.type.

Currently a request would display as successful in the traces/metrics but actually be aborted (aka failed)?

from opentelemetry-dotnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.