Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API: record should take a generic Attachment class instead of having tracing dependency. #144

Closed
songy23 opened this issue Jun 20, 2019 · 5 comments
Labels
area:api Cross language API specification issue spec:metrics Related to the specification/metrics directory

Comments

@songy23
Copy link
Member

songy23 commented Jun 20, 2019

Original discussion: #137 (comment).

@songy23 songy23 added the area:api Cross language API specification issue label Jun 20, 2019
@songy23 songy23 added this to the API revision: 07-2019 milestone Jun 20, 2019
@bogdandrutu
Copy link
Member

Pros:

  • Decouple metrics API from trace API.
  • Attachments can be used for other data besides SpanContext - for example extra tags or entries from the distrubutedcontext, or any other information.

Cons:

  • May generate an extra allocation in some languages.

@jmacd
Copy link
Contributor

jmacd commented Jun 26, 2019

@iredelmeier

@jmacd
Copy link
Contributor

jmacd commented Jul 1, 2019

@bogdandrutu can you say what you're hoping for by decoupling the metrics and trace API? This feels like a lost opportunity to me. At LightStep, we want these to be coupled. Isn't that the point of an integrated diagnostics library?

I've been meaning to propose a specification requirement along the lines of "every recorded statistic should be associated with a span context, whether implicit or explicit". This allows an implementation to aggregate metrics by Span always/automatically.

I am not familiar with other use-cases for this "attachment" concept.

@bogdandrutu
Copy link
Member

@jmacd I meant package dependency not conceptually. What we want is to actually be able to record in the metrics the SpanContext but by doing it like this (not necessary the API like this one):
https://github.com/census-instrumentation/opencensus-java/blob/master/api/src/main/java/io/opencensus/stats/MeasureMap.java#L85

Then have an implementation of the AttachmentValue that encapsulates the SpanContext.

This way in the code the metrics package does not depend on the trace package.

@iredelmeier iredelmeier added the spec:metrics Related to the specification/metrics directory label Jul 30, 2019
@SergeyKanzhelev SergeyKanzhelev removed this from the API revision: 07-2019 milestone Sep 27, 2019
@bogdandrutu
Copy link
Member

In the new API proposal this is no longer a thing.

rockb1017 pushed a commit to rockb1017/opentelemetry-specification that referenced this issue Nov 18, 2021
In many places, the term component was used in place of GDI repository.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:api Cross language API specification issue spec:metrics Related to the specification/metrics directory
Projects
None yet
Development

No branches or pull requests

5 participants