Skip to content

Commit

Permalink
More
Browse files Browse the repository at this point in the history
  • Loading branch information
trask committed Feb 20, 2023
1 parent 7c980ee commit 48fc707
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,16 +178,7 @@ private TelemetryItem exportRemoteDependency(SpanData span, boolean inProc, long

private static final Set<String> DEFAULT_HTTP_SPAN_NAMES =
new HashSet<>(
asList(
"HTTP OPTIONS",
"HTTP GET",
"HTTP HEAD",
"HTTP POST",
"HTTP PUT",
"HTTP DELETE",
"HTTP TRACE",
"HTTP CONNECT",
"HTTP PATCH"));
asList("OPTIONS", "GET", "HEAD", "POST", "PUT", "DELETE", "TRACE", "CONNECT", "PATCH"));

// the backend product prefers more detailed (but possibly infinite cardinality) name for http
// dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public final class MethodSingletons {
GlobalOpenTelemetry.get(),
INSTRUMENTATION_NAME,
CodeSpanNameExtractor.create(codeAttributesGetter))
.setInstrumentationVersion("1.23.0-alpha-applicationinsights")
.addAttributesExtractor(CodeAttributesExtractor.create(codeAttributesGetter))
// START APPLICATION INSIGHTS MODIFICATIONS
.buildInstrumenter(new MethodSpanKindExtractor());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ abstract class JettyNativeHandlerTest {
void doSimpleTest() throws Exception {
Telemetry telemetry = testing.getTelemetry(0);

assertThat(telemetry.rd.getName()).isEqualTo("HTTP GET");
assertThat(telemetry.rd.getName()).isEqualTo("GET");
assertThat(telemetry.rd.getUrl()).matches("http://localhost:[0-9]+/path");
assertThat(telemetry.rd.getResponseCode()).isEqualTo("200");
assertThat(telemetry.rd.getSuccess()).isTrue();
Expand Down

0 comments on commit 48fc707

Please sign in to comment.