Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,16 @@ nullaway {

tasks {
withType<JavaCompile>().configureEach {
if (name.contains("test", ignoreCase = true)) {
options.errorprone.nullaway {
enabled = false
}
} else {
options.errorprone.nullaway {
severity.set(CheckSeverity.ERROR)
}
}
options.errorprone.nullaway {
if (name.contains("test", ignoreCase = true)) {
disable()
} else {
error()
}
customInitializerAnnotations.add("org.openjdk.jmh.annotations.Setup")
excludedFieldAnnotations.add("org.mockito.Mock")
excludedFieldAnnotations.add("org.mockito.InjectMocks")
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

package io.opentelemetry.instrumentation.docs;

import static java.util.Collections.emptyList;
import static org.assertj.core.api.Assertions.assertThat;

import com.fasterxml.jackson.core.JsonProcessingException;
Expand Down Expand Up @@ -142,40 +143,11 @@ void testEmptyAdditionalTelemetry() throws JsonProcessingException {

InstrumentationMetadata actualMetadata = YamlHelper.metaDataParser(yamlContent);

ManualTelemetryEntry defaultEntry =
new ManualTelemetryEntry(
"default",
List.of(
new ManualTelemetryEntry.ManualMetric(
"system.disk.io",
"System disk IO",
"LONG_SUM",
"By",
List.of(
new TelemetryAttribute("device", "STRING"),
new TelemetryAttribute("direction", "STRING")))),
List.of(
new ManualTelemetryEntry.ManualSpan(
"CLIENT", List.of(new TelemetryAttribute("custom.operation", "STRING")))));

ManualTelemetryEntry experimentalEntry =
new ManualTelemetryEntry(
"experimental",
List.of(
new ManualTelemetryEntry.ManualMetric(
"experimental.feature.usage",
"Usage of experimental features",
"HISTOGRAM",
"s",
List.of(new TelemetryAttribute("feature.name", "STRING")))),
List.of());

InstrumentationMetadata expectedMetadata =
new InstrumentationMetadata.Builder()
.description("Example instrumentation with manual telemetry documentation")
.libraryLink("https://example.com/library")
.description("Example without manual telemetry")
.semanticConventions(List.of(SemanticConvention.HTTP_CLIENT_SPANS))
.additionalTelemetry(List.of(defaultEntry, experimentalEntry))
.additionalTelemetry(emptyList())
.overrideTelemetry(false)
.build();

Expand Down