Code Monkey home page Code Monkey logo

Comments (7)

tsloughter avatar tsloughter commented on June 4, 2024 1

Closing this as a won't fix. Maybe a contrib package could be created if someone submitted it.

from opentelemetry-erlang.

tsloughter avatar tsloughter commented on June 4, 2024

Hm, why? I'd rather not have the record exposed to anyone. Creation of events should go through the function call: OpenTelemetry.event/2

from opentelemetry-erlang.

tsloughter avatar tsloughter commented on June 4, 2024

It is far safer to require use of the functions because events need a timestamp in the proper format and the internal structure could change.

oh right, I think the issue with making it fully private is the use in exporters...

from opentelemetry-erlang.

garthk avatar garthk commented on June 4, 2024

Yeah, that's where the code above came from :).

Even if we do keep records private, our users will inevitably reverse engineer them when they need to. If we make breaking changes that cause problems, no amount of “yeah, but” will zero out the reputation damage. We're better off documenting our intended stability and version numbering strategy, I reckon.

from opentelemetry-erlang.

hauleth avatar hauleth commented on June 4, 2024

There may be functions to fetch information out of such records, so if the user want some informations if they need to, without reverse engineering the record itself. Of course if there is no such functions yet.

from opentelemetry-erlang.

garthk avatar garthk commented on June 4, 2024

That's Record.defrecord/3's job, yeah. We could switch defrecordp above to defrecord to expose an event macro for which event(e, :system_time_nano) would return just that field, but it'd also expose a write API, hence my habit of providing from/1 giving a struct.

from opentelemetry-erlang.

garthk avatar garthk commented on June 4, 2024

Here's a fun corner case: getting Span out of deps/opentelemetry/include/otel_span.hrl. For the first time, I'm tempted to drag all the machinery I'd use for testing integrations into its own package.

from opentelemetry-erlang.

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.