Skip to content

Commit

Permalink
Update method name from review.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsuereth committed Jul 7, 2021
1 parent 65b78a4 commit 090d79a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ static Collection<HistogramDataPoint> toHistogramDataPoints(
static Exemplar toExemplar(io.opentelemetry.sdk.metrics.data.Exemplar exemplar) {
// TODO - Use a thread local cache for spanid/traceid -> byte conversion.
Exemplar.Builder builder = Exemplar.newBuilder();
builder.setTimeUnixNano(exemplar.getRecordTimeNanos());
builder.setTimeUnixNano(exemplar.getEpochNanos());
if (exemplar.getSpanId() != null) {
builder.setSpanId(convertSpanId(exemplar.getSpanId()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ private static io.prometheus.client.exemplars.Exemplar toPrometheusExemplar(Exem
if (exemplar.getSpanId() != null && exemplar.getTraceId() != null) {
return new io.prometheus.client.exemplars.Exemplar(
exemplar.getValueAsDouble(),
// Convert to ms for prometheus, truncate nanosecond preceision.
TimeUnit.NANOSECONDS.toMillis(exemplar.getRecordTimeNanos()),
// Convert to ms for prometheus, truncate nanosecond precision.
TimeUnit.NANOSECONDS.toMillis(exemplar.getEpochNanos()),
"trace_id",
exemplar.getTraceId(),
"span_id",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public interface Exemplar {
Attributes getFilteredAttributes();

/** Returns the timestamp in nanos when measurement was collected. */
long getRecordTimeNanos();
long getEpochNanos();

/**
* (Optional) Span ID of the exemplar trace.
Expand Down

0 comments on commit 090d79a

Please sign in to comment.