Skip to content

Commit f620354

Browse files
authored
Revert "Add user and org labels to observed exemplars"
1 parent 67d27ed commit f620354

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

instrument/instrument.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,9 @@ func (c *HistogramCollector) After(ctx context.Context, method, statusCode strin
6868
// (this will always work for a HistogramVec).
6969
func ObserveWithExemplar(ctx context.Context, histogram prometheus.Observer, seconds float64) {
7070
if traceID, ok := tracing.ExtractSampledTraceID(ctx); ok {
71-
lbls := prometheus.Labels{"traceID": traceID}
72-
if userID, err := user.ExtractUserID(ctx); err == nil {
73-
lbls["user"] = userID
74-
}
75-
if orgID, err := user.ExtractOrgID(ctx); err == nil {
76-
lbls["organization"] = orgID
77-
}
7871
histogram.(prometheus.ExemplarObserver).ObserveWithExemplar(
7972
seconds,
80-
lbls,
73+
prometheus.Labels{"traceID": traceID},
8174
)
8275
return
8376
}

0 commit comments

Comments
 (0)