Skip to content

Commit

Permalink
Use proper pre/suffixes for internal metrics names
Browse files Browse the repository at this point in the history
  • Loading branch information
marctc committed Jun 17, 2024
1 parent df39202 commit f58f197
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
18 changes: 9 additions & 9 deletions docs/sources/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ In order to configure which attributes to show or which attributes to hide, chec

Beyla can be [configured to report internal metrics]({{< relref "./configure/options.md#internal-metrics-reporter" >}}) in Prometheus Format.

| Name | Type | Description |
| --------------------------- | ---------- | ---------------------------------------------------------------------------------------- |
| `ebpf_tracer_flushes` | Histogram | Length of the groups of traces flushed from the eBPF tracer to the next pipeline stage |
| `otel_metric_exports` | Counter | Length of the metric batches submitted to the remote OTEL collector |
| `otel_metric_export_errors` | CounterVec | Error count on each failed OTEL metric export, by error type |
| `otel_trace_exports` | Counter | Length of the trace batches submitted to the remote OTEL collector |
| `otel_trace_export_errors` | CounterVec | Error count on each failed OTEL trace export, by error type |
| `prometheus_http_requests` | CounterVec | Number of requests towards the Prometheus Scrape endpoint, faceted by HTTP port and path |
| `beyla_instrumented_processes` | GaugeVec | Instrumented processes by Beyla, with process name |
| Metric Name | Type | Description |
| ------------------------------------- | ----------- | ---------------------------------------------------------------------------------------- |
| `beyla_ebpf_tracer_flushes` | Histogram | Length of the groups of traces flushed from the eBPF tracer to the next pipeline stage |
| `beyla_otel_metric_exports_total` | Counter | Length of the metric batches submitted to the remote OTEL collector |
| `beyla_otel_metric_export_errors_total` | CounterVec | Error count on each failed OTEL metric export, by error type |
| `beyla_otel_trace_exports_total` | Counter | Length of the trace batches submitted to the remote OTEL collector |
| `beyla_otel_trace_export_errors_total` | CounterVec | Error count on each failed OTEL trace export, by error type |
| `prometheus_http_requests_total` | CounterVec | Number of requests towards the Prometheus Scrape endpoint, faceted by HTTP port and path |
| `beyla_instrumented_processes` | GaugeVec | Instrumented processes by Beyla, with process name |
26 changes: 13 additions & 13 deletions pkg/internal/imetrics/iprom.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,36 +35,36 @@ func NewPrometheusReporter(cfg *PrometheusConfig, manager *connector.PrometheusM
pr := &PrometheusReporter{
connector: manager,
tracerFlushes: prometheus.NewHistogram(prometheus.HistogramOpts{
Name: "ebpf_tracer_flushes",
Help: "length of the groups of traces flushed from the eBPF tracer to the next pipeline stage",
Name: "beyla_ebpf_tracer_flushes",
Help: "Length of the groups of traces flushed from the eBPF tracer to the next pipeline stage",
Buckets: pipelineBufferLengths,
NativeHistogramBucketFactor: 1.1,
NativeHistogramMaxBucketNumber: 100,
NativeHistogramMinResetDuration: 1 * time.Hour,
}),
otelMetricExports: prometheus.NewCounter(prometheus.CounterOpts{
Name: "otel_metric_exports",
Help: "length of the metric batches submitted to the remote OTEL collector",
Name: "beyla_otel_metric_exports_total",
Help: "Length of the metric batches submitted to the remote OTEL collector",
}),
otelMetricExportErrs: prometheus.NewCounterVec(prometheus.CounterOpts{
Name: "otel_metric_export_errors",
Help: "error count on each failed OTEL metric export",
Name: "beyla_otel_metric_export_errors_total",
Help: "Error count on each failed OTEL metric export",
}, []string{"error"}),
otelTraceExports: prometheus.NewCounter(prometheus.CounterOpts{
Name: "otel_trace_exports",
Help: "length of the trace batches submitted to the remote OTEL collector",
Name: "beyla_otel_trace_exports_total",
Help: "Length of the trace batches submitted to the remote OTEL collector",
}),
otelTraceExportErrs: prometheus.NewCounterVec(prometheus.CounterOpts{
Name: "otel_trace_export_errors",
Help: "error count on each failed OTEL trace export",
Name: "beyla_otel_trace_export_errors_total",
Help: "Error count on each failed OTEL trace export",
}, []string{"error"}),
prometheusRequests: prometheus.NewCounterVec(prometheus.CounterOpts{
Name: "prometheus_http_requests",
Help: "requests towards the Prometheus Scrape endpoint",
Name: "prometheus_http_requests_total",
Help: "Requests towards the Prometheus Scrape endpoint",
}, []string{"port", "path"}),
instrumentedProcesses: prometheus.NewGaugeVec(prometheus.GaugeOpts{
Name: "beyla_instrumented_processes",
Help: "instrumented processes by Beyla",
Help: "Instrumented processes by Beyla",
}, []string{"process_name"}),
}
manager.Register(cfg.Port, cfg.Path,
Expand Down

0 comments on commit f58f197

Please sign in to comment.