GithubHelp home page GithubHelp logo

Comments (5)

oibe avatar oibe commented on May 26, 2024

Do you want this implemented exactly as opentracing does it? Second half of the logs used as a circular buffer?

from jaeger-client-go.

yurishkuro avatar yurishkuro commented on May 26, 2024

@funny-falcon do you have a specific business reason to want this feature?

from jaeger-client-go.

funny-falcon avatar funny-falcon commented on May 26, 2024

from jaeger-client-go.

yurishkuro avatar yurishkuro commented on May 26, 2024

Nice. Could you share which logging API you are using to fork logs into both stream and spans?

Also, logs are usually written with log levels, so if you need to truncate them in the span it would make sense to do in the order of severity. Which makes me think that a plain maxLogs parameter is too crude of a mechanism, we probably need to use some strategy pattern and create some LogTruncator interface.

from jaeger-client-go.

funny-falcon avatar funny-falcon commented on May 26, 2024

We use custom logging library, therefore it were easy to integrate it with tracing: library has concept of exporters that could be added to logger with specified log level, and there were access to context.Context in a log record.

Some considerations from our workflow:

  • spans with a lot of log records a rare, therefore we need to look at them almost never.
  • if span had some problems, usually log records about a problem will be in among last log records. And setup records goes first. Therefore keeping some of first records and some of last records looks to be a good strategy that satisfies 99% uses.
  • since we duplicate log in logging (that flows to ELK), we always could find truncated records there.

Therefore suggested solutions will satisfy our needs completely. And I doubt complication will pay off.

from jaeger-client-go.

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.