Skip to content

Commit

Permalink
Reorder methods on SpanData for better AutoValue toString (open-telem…
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuraag Agrawal authored Jun 14, 2021
1 parent 7be6d24 commit 1443da1
Showing 1 changed file with 32 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,20 @@
@Immutable
public interface SpanData {

/**
* Returns the name of this {@code Span}.
*
* @return the name of this {@code Span}.
*/
String getName();

/**
* Returns the kind of this {@code Span}.
*
* @return the kind of this {@code Span}.
*/
SpanKind getKind();

/** Returns the {@link SpanContext} of the Span. */
SpanContext getSpanContext();

Expand Down Expand Up @@ -59,33 +73,11 @@ default String getParentSpanId() {
}

/**
* Returns the resource of this {@code Span}.
*
* @return the resource of this {@code Span}.
*/
Resource getResource();

/**
* Returns the instrumentation library specified when creating the tracer which produced this
* {@code Span}.
*
* @return an instance of {@link InstrumentationLibraryInfo}
*/
InstrumentationLibraryInfo getInstrumentationLibraryInfo();

/**
* Returns the name of this {@code Span}.
*
* @return the name of this {@code Span}.
*/
String getName();

/**
* Returns the kind of this {@code Span}.
* Returns the {@code Status}.
*
* @return the kind of this {@code Span}.
* @return the {@code Status}.
*/
SpanKind getKind();
StatusData getStatus();

/**
* Returns the start epoch timestamp in nanos of this {@code Span}.
Expand Down Expand Up @@ -115,13 +107,6 @@ default String getParentSpanId() {
*/
List<LinkData> getLinks();

/**
* Returns the {@code Status}.
*
* @return the {@code Status}.
*/
StatusData getStatus();

/**
* Returns the end epoch timestamp in nanos of this {@code Span}.
*
Expand Down Expand Up @@ -163,4 +148,19 @@ default String getParentSpanId() {
* @return The total number of attributes on this span.
*/
int getTotalAttributeCount();

/**
* Returns the instrumentation library specified when creating the tracer which produced this
* {@code Span}.
*
* @return an instance of {@link InstrumentationLibraryInfo}
*/
InstrumentationLibraryInfo getInstrumentationLibraryInfo();

/**
* Returns the resource of this {@code Span}.
*
* @return the resource of this {@code Span}.
*/
Resource getResource();
}

0 comments on commit 1443da1

Please sign in to comment.