Git Product home page Git Product logo

Comments (3)

damemi avatar damemi commented on September 13, 2024

Thanks for the detailed report @quentinmit, I'll take a look

from opentelemetry-operations-go.

quentinmit avatar quentinmit commented on September 13, 2024

I think Braydon might not have enough context on this bug. I had two questions that I was hoping someone with context would answer:

  • Why does this code try to parse the attribute as JSON in the first place? Presumably you could just copy the logic that's already used for the HTTP fields:

    var httpBytes []byte
    switch httpRequestAttr.Type() {
    case pcommon.ValueTypeBytes:
    httpBytes = httpRequestAttr.Bytes().AsRaw()
    case pcommon.ValueTypeStr, pcommon.ValueTypeMap:
    httpBytes = []byte(httpRequestAttr.AsString())
    }

    but that doesn't explain why JSON was the only supported format.

  • Why does this use the gcp.source_location attribute instead of the semantic conventions for code location attributes? And if we want to fix that, what happens if both attributes are present?

from opentelemetry-operations-go.

damemi avatar damemi commented on September 13, 2024

I agree that this should check more than just bytes as part of the fix, similar to the http attrs. It looks like I had that as a todo at one point too (

// TODO(damemi): parse/test sourceLocation from more than just bytes values
) but I can't find why we were ok with just checking bytes originally.

We use gcp.source_location because we chose to default to gcp.* for our log entry mapping. As a guess, maybe that choice predates the code location semantic conventions or it was just an oversight. But I also agree that unifying to those conventions is the right path here.

I talked to Braydon offline about if he would take this issue, sorry for not including that context. He's done a lot of work on the logs exporter and the semantic conventions around it already. But I'm happy to help with anything too.

from opentelemetry-operations-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.