-
Notifications
You must be signed in to change notification settings - Fork 56
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
Prometheus Exporter #203
Prometheus Exporter #203
Conversation
d547634
to
ec13f37
Compare
ec13f37
to
6c1dc7d
Compare
d48e3aa
to
d9ae4a4
Compare
d9ae4a4
to
c22aaf3
Compare
...main/java/io/aklivity/zilla/runtime/exporter/prometheus/internal/config/EndpointAdapter.java
Outdated
Show resolved
Hide resolved
.../main/java/io/aklivity/zilla/runtime/exporter/prometheus/internal/config/EndpointConfig.java
Outdated
Show resolved
Hide resolved
...livity/zilla/runtime/exporter/prometheus/internal/descriptor/PrometheusMetricDescriptor.java
Outdated
Show resolved
Hide resolved
.../java/io/aklivity/zilla/runtime/exporter/prometheus/internal/processor/MetricsProcessor.java
Outdated
Show resolved
Hide resolved
} | ||
|
||
private String histogramFormatter( | ||
String[] s, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need a better parameter name, or split into namespace
and binding
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, I expanded String[] s
to String metric, String namespace, String binding
, and for consistency I did the same for private String counterGaugeFormatter
. Now I ended up having to create some funky named typed interfaces 😎 QuintFunction
and Object3LongFunction
. Pls check.
...main/java/io/aklivity/zilla/runtime/exporter/prometheus/internal/record/HistogramRecord.java
Outdated
Show resolved
Hide resolved
...io/aklivity/zilla/runtime/exporter/prometheus/internal/utils/ObjectObjectObjectFunction.java
Outdated
Show resolved
Hide resolved
...rc/main/java/io/aklivity/zilla/runtime/exporter/prometheus/internal/labels/LabelManager.java
Outdated
Show resolved
Hide resolved
...n/java/io/aklivity/zilla/runtime/exporter/prometheus/internal/PrometheusExporterHandler.java
Show resolved
Hide resolved
metrics.print(out); | ||
try | ||
{ | ||
output = os.toString("UTF8"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is triggering plenty of object allocation, so we'll take another pass on that after these changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's revisit the new functional interfaces after addressing the object creation optimization feedback. I suspect that by inverting the polarity of how we generate the output, some of these functional interfaces may no longer be required.
...n/java/io/aklivity/zilla/runtime/exporter/prometheus/internal/PrometheusExporterContext.java
Outdated
Show resolved
Hide resolved
.../io/aklivity/zilla/runtime/exporter/prometheus/internal/config/PrometheusEndpointConfig.java
Outdated
Show resolved
Hide resolved
...ain/java/io/aklivity/zilla/runtime/exporter/prometheus/internal/processor/LayoutManager.java
Outdated
Show resolved
Hide resolved
.../java/io/aklivity/zilla/runtime/exporter/prometheus/internal/processor/MetricsProcessor.java
Outdated
Show resolved
Hide resolved
...io/aklivity/zilla/runtime/exporter/prometheus/internal/config/PrometheusEndpointAdapter.java
Outdated
Show resolved
Hide resolved
...main/scripts/io/aklivity/zilla/specs/exporter/prometheus/schema/prometheus.schema.patch.json
Show resolved
Hide resolved
}, | ||
"additionalProperties": false | ||
}, | ||
"maxItems": 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove this, and spin up multiple HttpServer
instances, one per endpoint.
In practice folks may only use one anyway, but this will keep the door open in case they have some requirement for http and https or something, plus less confusing when we attempt to document.
Btw, for https
to work, we need to make sure the server
certificate chain and key is configured, probably via vault
.
* Add stream metrics spec and impl projects * Add http metrics spec and impl projects * Add metrics modules to incubator docker image * Metrics schema, extensibility, storage and command line support (#173) * Create incubator projects for exporter-prometheus.spec and exporter-prometheus * Engine support to exporters (#202) * Fix metrics command, find layout files in the engine dir (#204) * Prometheus Exporter (#203) * Minimize performance overhead for metric collection (#217) * Remove zilla load command (#223) * Introducing Stream Direction to Optimize Metric Collection (#224) * Add http.active.requests and http.duration metrics (#227) --------- Co-authored-by: Attila Kreiner <[email protected]>
No description provided.