Code Monkey home page Code Monkey logo

Comments (7)

dmathieu avatar dmathieu commented on June 13, 2024 1

I'm taking a new look at this, and now that we return the merged, schemaless resource on a merge conflict (#4876), I'm not sure adding a more explicit documentation is required.

from opentelemetry-go.

Sanket-0510 avatar Sanket-0510 commented on June 13, 2024

@pellared shall I take this?

from opentelemetry-go.

dmathieu avatar dmathieu commented on June 13, 2024

This is currently assigned to me, but feel free to take it.

from opentelemetry-go.

Sanket-0510 avatar Sanket-0510 commented on June 13, 2024

RIght now I can only figure out that users can use resource.NewSchemaless instead of resource.NewWIthAttributes if they want to lower the chances of facing resource merge conflicts while implementing Otel go into their go application using
https://opentelemetry.io/docs/languages/go/getting-started/#initialize-the-opentelemetry-sdk

so right now I have only one reason yo use NewSchemaless. where can I find more info regarding both in order to create clear pros and cons of using them in doc file?

from opentelemetry-go.

pellared avatar pellared commented on June 13, 2024

The main use case of using resource.NewSchemaless is when the attributes do not even follow the semantic conventions (when one adds custom attributes).

from opentelemetry-go.

Sanket-0510 avatar Sanket-0510 commented on June 13, 2024

@pellared I have prepared this thing for now :

Pros:
Lower Chances of Merge Conflicts:

Pro: Using newSchemaless may reduce the likelihood of facing resource merge conflicts,
especially when dealing with a large codebase or when different contributors are adding custom attributes.
Custom Attributes without Semantic Conventions:

Pro: Ideal for scenarios where custom attributes are added without adhering strictly to semantic conventions.


Cons:
Less Semantic Structure:

1. Con: "Schemaless" nature hampers adherence to predefined structures, making code maintenance challenging.

2. Con: Lack of a well-defined schema results in inconsistency in attribute usage across the codebase.

so this pr should be for -Otel-go Docs Right?

Where do I add this?

from opentelemetry-go.

pellared avatar pellared commented on June 13, 2024

I agree especially that https://pkg.go.dev/go.opentelemetry.io/otel/sdk/resource#example-New even shows how one can handle the conflict

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