-
Notifications
You must be signed in to change notification settings - Fork 872
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
493 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
...in/java/io/opentelemetry/instrumentation/api/semconv/http/HttpClientTelemetryBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.instrumentation.api.semconv.http; | ||
|
||
import com.google.errorprone.annotations.CanIgnoreReturnValue; | ||
import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor; | ||
import io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor; | ||
import io.opentelemetry.instrumentation.api.instrumenter.SpanStatusExtractor; | ||
import java.util.List; | ||
import java.util.Set; | ||
import java.util.function.Function; | ||
|
||
public interface HttpClientTelemetryBuilder<REQUEST, RESPONSE> { | ||
|
||
@CanIgnoreReturnValue | ||
HttpClientTelemetryBuilder<REQUEST, RESPONSE> addAttributesExtractor( | ||
AttributesExtractor<REQUEST, RESPONSE> attributesExtractor); | ||
|
||
@CanIgnoreReturnValue | ||
HttpClientTelemetryBuilder<REQUEST, RESPONSE> setCapturedRequestHeaders( | ||
List<String> requestHeaders); | ||
|
||
@CanIgnoreReturnValue | ||
HttpClientTelemetryBuilder<REQUEST, RESPONSE> setCapturedResponseHeaders( | ||
List<String> responseHeaders); | ||
|
||
@CanIgnoreReturnValue | ||
HttpClientTelemetryBuilder<REQUEST, RESPONSE> setKnownMethods(Set<String> knownMethods); | ||
|
||
@CanIgnoreReturnValue | ||
HttpClientTelemetryBuilder<REQUEST, RESPONSE> setSpanNameExtractor( | ||
Function<SpanNameExtractor<REQUEST>, SpanNameExtractor<REQUEST>> | ||
spanNameExtractorTransformer); | ||
|
||
@CanIgnoreReturnValue | ||
HttpClientTelemetryBuilder<REQUEST, RESPONSE> setStatusExtractor( | ||
Function<SpanStatusExtractor<REQUEST, RESPONSE>, SpanStatusExtractor<REQUEST, RESPONSE>> | ||
statusExtractorTransformer); | ||
|
||
Object build(); | ||
} |
44 changes: 44 additions & 0 deletions
44
...in/java/io/opentelemetry/instrumentation/api/semconv/http/HttpServerTelemetryBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.instrumentation.api.semconv.http; | ||
|
||
import com.google.errorprone.annotations.CanIgnoreReturnValue; | ||
import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor; | ||
import io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor; | ||
import io.opentelemetry.instrumentation.api.instrumenter.SpanStatusExtractor; | ||
import java.util.List; | ||
import java.util.Set; | ||
import java.util.function.Function; | ||
|
||
public interface HttpServerTelemetryBuilder<REQUEST, RESPONSE> { | ||
|
||
@CanIgnoreReturnValue | ||
HttpServerTelemetryBuilder<REQUEST, RESPONSE> addAttributesExtractor( | ||
AttributesExtractor<REQUEST, RESPONSE> attributesExtractor); | ||
|
||
@CanIgnoreReturnValue | ||
HttpServerTelemetryBuilder<REQUEST, RESPONSE> setCapturedRequestHeaders( | ||
List<String> requestHeaders); | ||
|
||
@CanIgnoreReturnValue | ||
HttpServerTelemetryBuilder<REQUEST, RESPONSE> setCapturedResponseHeaders( | ||
List<String> responseHeaders); | ||
|
||
@CanIgnoreReturnValue | ||
HttpServerTelemetryBuilder<REQUEST, RESPONSE> setKnownMethods(Set<String> knownMethods); | ||
|
||
@CanIgnoreReturnValue | ||
HttpServerTelemetryBuilder<REQUEST, RESPONSE> setSpanNameExtractor( | ||
Function<SpanNameExtractor<REQUEST>, SpanNameExtractor<REQUEST>> | ||
spanNameExtractorTransformer); | ||
|
||
@CanIgnoreReturnValue | ||
HttpServerTelemetryBuilder<REQUEST, RESPONSE> setStatusExtractor( | ||
Function<SpanStatusExtractor<REQUEST, RESPONSE>, SpanStatusExtractor<REQUEST, RESPONSE>> | ||
statusExtractorTransformer); | ||
|
||
Object build(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.