Giter VIP home page Giter VIP logo

Comments (11)

jiamo avatar jiamo commented on August 25, 2024

Another question: Can we only send data the time is bigger than 100ms. Because there are so many request and I only care about the slow request. so the span with little delay(such as 1ms) may don't need to send to the collector (which is also a service need resource to hold all the request). The rate option may be different with what I want.

from aiozipkin.

konstantin-stepanov avatar konstantin-stepanov commented on August 25, 2024

Hi. For such specific tasks it is better to override the transport class i think. But implementation of the filtering of the spans by their parameters seems to me a good idea.
It can be combined with #39.
@jettify what do you think about this?

from aiozipkin.

konstantin-stepanov avatar konstantin-stepanov commented on August 25, 2024

it seems to me that the call asyncio.sleep at the end is also superfluous. because tracer.close() calling transport._send()

from aiozipkin.

jettify avatar jettify commented on August 25, 2024

Good catch! I have not updated this example, after implementing transport more properly, also agree on asyncio.sleep should be removed.

@jiamo would you like to create PR with fix?

from aiozipkin.

jettify avatar jettify commented on August 25, 2024

As for question, I am not sure how to implement time filtering, consider following scenario:
We have 3 chained spans with times 1ms, 1ms and 101ms, we leave only third span due to filter, as result we also loose important information a full chain of calls that leaded to this particular span.

If you want to see response time of one particular endpoint, than other statistics and monitoring tools are more suitable (like https://github.com/graphite-project). Value of distributed tracing in seeing chain of calls and all interactions with other services.

from aiozipkin.

jiamo avatar jiamo commented on August 25, 2024

In this case We have 3 chained spans with times 1ms, 1ms and 101ms What I wish is to collect them all because the total cast = 1 + 1 + 101 is big. (I don't looked into the source code. If it send data to collector at the close (will always be called at my on_response middleware in sanic) Then the filter is meaningful.

from aiozipkin.

jettify avatar jettify commented on August 25, 2024

from aiozipkin.

jettify avatar jettify commented on August 25, 2024

Example fixed in 326e966

from aiozipkin.

jettify avatar jettify commented on August 25, 2024

@konstantin-stepanov what do you think about context manger API around az.create?

async with az.create(zipkin_address, endpoint, sample_rate=1.0) as tracer
    with tracer.new_trace(sampled=True) as span:
        span.name('root_span')

I just wondering if it is useful outside test...

from aiozipkin.

konstantin-stepanov avatar konstantin-stepanov commented on August 25, 2024

I like this idea. This simplifies the code and it looks more readable.

As for useful, it depends on applicatuon architecture. I think It will be perfect in MVP

from aiozipkin.

jettify avatar jettify commented on August 25, 2024

Created issue to track this idea #99

from aiozipkin.

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.