GithubHelp home page GithubHelp logo

Comments (5)

cijothomas avatar cijothomas commented on September 25, 2024 2

The repro shared is not adding builder.Services.ConfigureOpenTelemetryTracerProvider((sp, builder) => builder.AddSource("test"));
Could you add that and try again?

from azure-sdk-for-net.

TimothyMothra avatar TimothyMothra commented on September 25, 2024 1

There's three ways to use the using keyword:

  1. using with a block

    using (new SomeClass())
    {
        // do some work
    }
    
  2. using with a block (shorthand)

    using (new SomeClass());
    // do some work
    
  3. using with a declared variable.

    using var someClass = new SomeClass();
    // do some work
    

In your code sample, you're using option 2.
So your activity is disposed after the LogInformation.
Your activity does not encompass the dependency call to bing.

from azure-sdk-for-net.

github-actions avatar github-actions commented on September 25, 2024

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @cijothomas @rajkumar-rangaraj @reyang @TimothyMothra @vishweshbankwar.

from azure-sdk-for-net.

TaoChenOSU avatar TaoChenOSU commented on September 25, 2024

The repro shared is not adding builder.Services.ConfigureOpenTelemetryTracerProvider((sp, builder) => builder.AddSource("test")); Could you add that and try again?

You're right! Thanks!

However, when I did that, my custom activity did showed up but the activity duration seemed to be off.
image
image

I'd expect it to include the duration of the request to https://www.bing.com/.

from azure-sdk-for-net.

TaoChenOSU avatar TaoChenOSU commented on September 25, 2024

Thank you so much!

I figured it out why my traces were not showing up in ApplicationInsights. It's because I had the SamplingRatio set to 0.05. I'd recommend anyone who is testing their telemetry pipeline end-to-end to not set the SamplingRatio.

from azure-sdk-for-net.

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.