Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

+ opentelemetry: Add metrics support #1289

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 4 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -963,8 +963,10 @@ lazy val `kamon-opentelemetry` = (project in file("reporters/kamon-opentelemetry
.disablePlugins(AssemblyPlugin)
.settings(
libraryDependencies ++= Seq(
"io.opentelemetry" % "opentelemetry-exporter-otlp-http-trace" % "1.13.0",
"io.opentelemetry" % "opentelemetry-exporter-otlp-trace" % "1.13.0",
"io.opentelemetry" % "opentelemetry-exporter-otlp-http-trace" % "1.14.0",
"io.opentelemetry" % "opentelemetry-exporter-otlp-trace" % "1.14.0",
"io.opentelemetry" % "opentelemetry-exporter-otlp-http-metrics" % "1.14.0",
"io.opentelemetry" % "opentelemetry-exporter-otlp-metrics" % "1.14.0",
// Compile-time dependency required in scala 3
"com.google.auto.value" % "auto-value-annotations" % "1.9" % "compile",

Expand Down
71 changes: 70 additions & 1 deletion reporters/kamon-opentelemetry/src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,27 @@ kamon.otel {
attributes = ""
attributes = ${?OTEL_RESOURCE_ATTRIBUTES}

metrics {
endpoint = ${kamon.otel.endpoint}
full-endpoint = ${?OTEL_EXPORTER_OTLP_METRICS_ENDPOINT}

compression = ${kamon.otel.compression}
compression = ${?OTEL_EXPORTER_OTLP_METRICS_COMPRESSION}

headers = ${kamon.otel.headers}
headers = ${?OTEL_EXPORTER_OTLP_METRICS_HEADERS}

timeout = ${kamon.otel.timeout}
timeout = ${?OTEL_EXPORTER_OTLP_METRICS_TIMEOUT}

protocol = ${kamon.otel.protocol}
protocol = ${?OTEL_EXPORTER_OTLP_METRICS_PROTOCOL}

# explicit_bucket_histogram or base2_exponential_bucket_histogram
histogram-format = explicit_bucket_histogram
histogram-format = ${?OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION}
}

trace {
endpoint = ${kamon.otel.endpoint}
full-endpoint = ${?OTEL_EXPORTER_OTLP_TRACES_ENDPOINT}
Expand All @@ -47,6 +68,48 @@ kamon.otel {
# standard attribute names; enable for 'more full' compliance with otel standard
include-error-event = false
}

explicit-histo-boundaries {
# Same as defaults from https://opentelemetry.io/docs/specs/otel/metrics/sdk/#explicit-bucket-histogram-aggregation
default-buckets = [
0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000
]

# The following are the same as for the prometheus reporter default values
time-buckets = [
0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10
]

information-buckets = [
512, 1024, 2048, 4096, 16384, 65536, 524288, 1048576
]

percentage-buckets = [
20, 40, 60, 70, 80, 90, 95
]

# Per metric overrides are possible by specifying the metric name and the histogram buckets here
custom {
// example:
// "akka.actor.processing-time" = [0.1, 1.0, 10.0]
}
}

exponential-histo-boundaries {
default-bucket-count = 160

time-bucket-count = 160

information-bucket-count = 160

percentage-bucket-count = 100

# Per metric overrides are possible by specifying the metric name and the histogram buckets here
custom {
// example:
// "akka.actor.processing-time" = 3
}
}
}

# Arbitrary key-value pairs that further identify the environment where this service instance is running.
Expand All @@ -64,7 +127,13 @@ kamon.modules {
otel-trace-reporter {
enabled = true
name = "OpenTelemetry Trace Reporter"
description = "Sends trace data to a OpenTelemetry server via gRPC"
description = "Sends trace data to a OpenTelemetry server via gRPC/HTTP+protobuf"
factory = "kamon.otel.OpenTelemetryTraceReporter$Factory"
}
otel-metrics-reporter {
enabled = true
name = "OpenTelemetry Metrics Reporter"
description = "Sends metrics data to a OpenTelemetry server via gRPC/HTTP+protobuf"
factory = "kamon.otel.OpenTelemetryMetricsReporter$Factory"
}
}
Loading
Loading