-
Notifications
You must be signed in to change notification settings - Fork 327
Exemplar: revert wrong implementation. #1067
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to review more PRs to fix this.
trace/exemplar.go
Outdated
) | ||
|
||
func init() { | ||
exemplar.RegisterAttachmentExtractor(attachSpanContext) | ||
metricdata.RegisterAttachmentExtractor(attachSpanContext) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to cleanup these things as well probably. Don't really understand why we need this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree trace
or tag
shouldn't depend on exemplar
. I removed AttachmentExtractor
for now.
tag/context.go
Outdated
@@ -45,10 +45,10 @@ type ctxKey struct{} | |||
var mapCtxKey = ctxKey{} | |||
|
|||
func init() { | |||
exemplar.RegisterAttachmentExtractor(extractTagsAttachments) | |||
metricdata.RegisterAttachmentExtractor(extractTagsAttachments) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a wrong usage of exemplars, tags are not "exemplars"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.
60c842a
to
8ab21ab
Compare
Will this be a breaking change? |
This is a breaking change to those who import "go.opencensus.io/exemplar". Though I don't believe any user would be using the previous exemplar APIs since no backend supports it before. For |
This PR is only doing cleanups. More PRs will follow on refactoring the exemplar APIs. |
@songy23 @rghetia
This also breaks |
please see suggestion for solution in census-ecosystem/opencensus-go-exporter-ocagent#49 |
Sorry for the trouble, I wasn't aware that there're downstream libraries depending on this. #1071 should fix it temporarily, meanwhile please migrate to the new package like census-ecosystem/opencensus-go-exporter-ocagent#49. |
* Exemplar: move to metricdata. * Remove AttachmentExtractor. * More cleanup. * Add a TODO for next PR. (cherry picked from commit 604812a)
Updates #1058.
Java counterpart: census-instrumentation/opencensus-java#1791. The first step on refactoring exemplar APIs. More PRs will follow.