Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .obi-src
Submodule .obi-src updated 326 files
4 changes: 2 additions & 2 deletions docs/sources/configure/export-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ otel_metrics_export:
features: ["network", "network_inter_zone"]
buckets:
duration_histogram: [0, 1, 2]
histogram_aggregation: base2_exponential_bucket_histogram
histogram_aggregation: explicit_bucket_histogram
```

| YAML<p>environment variable</p> | Description | Type | Default |
Expand All @@ -85,7 +85,7 @@ otel_metrics_export:
| `allow_service_graph_self_references`<p>`BEYLA_OTEL_ALLOW_SERVICE_GRAPH_SELF_REFERENCES`</p> | Controls if Beyla includes self-referencing services in service graph generation, for example a service that calls itself. Self referencing reduces service graph usefulness and increases data cardinality. | boolean | `false` |
| `instrumentations`<p>`BEYLA_OTEL_METRICS_INSTRUMENTATIONS`</p> | The list of metrics instrumentation Beyla collects data for, refer to [metrics instrumentation](#metrics-instrumentation) section. | list of strings | `["*"]` |
| `buckets` | Sets how you can override bucket boundaries of diverse histograms, refer to [override histogram buckets](../metrics-histograms/). | (n/a) | Object |
| `histogram_aggregation`<p>`OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION`</p> | Sets the default aggregation Beyla uses for histogram instruments. Accepted values [`explicit_bucket_histogram`](https://opentelemetry.io/docs/specs/otel/metrics/sdk/#explicit-bucket-histogram-aggregation) or [`base2_exponential_bucket_histogram`](https://opentelemetry.io/docs/specs/otel/metrics/sdk/#base2-exponential-bucket-histogram-aggregation). | `string` | `explicit_bucket_histogram` |
| `histogram_aggregation`<p>`OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION`</p> | Sets the default aggregation Beyla uses for histogram instruments. Accepted values [`explicit_bucket_histogram`](https://opentelemetry.io/docs/specs/otel/metrics/sdk/#explicit-bucket-histogram-aggregation) or [`base2_exponential_bucket_histogram`](https://opentelemetry.io/docs/specs/otel/metrics/sdk/#base2-exponential-bucket-histogram-aggregation). | `string` | `base2_exponential_bucket_histogram` |

### Metrics export protocol

Expand Down
4 changes: 3 additions & 1 deletion docs/sources/configure/metrics-histograms.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ For example:

```yaml
otel_metrics_export:
histogram_aggregation: explicit_bucket_histogram
buckets:
duration_histogram: [0, 1, 2]
```
Expand Down Expand Up @@ -76,4 +77,5 @@ These default values are UNSTABLE and may change if Prometheus or OpenTelemetry

For Prometheus, you enable [native histograms](https://prometheus.io/docs/concepts/metric_types/#histogram) by [enabling the `native-histograms` feature in your Prometheus collector](https://prometheus.io/docs/prometheus/latest/feature_flags/#native-histograms).

For OpenTelemetry, you can use [exponential histograms](https://opentelemetry.io/docs/specs/otel/metrics/data-model/#exponentialhistogram) for the predefined histograms instead of defining the buckets manually. Set the standard [OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION](https://opentelemetry.io/docs/specs/otel/metrics/sdk_exporters/otlp/#additional-configuration) environment variable. See the `histogram_aggregation` section in the [OTEL metrics exporter](../export-data/) section for more information.
For OpenTelemetry, Beyla is configured to export [exponential histograms](https://opentelemetry.io/docs/specs/otel/metrics/data-model/#exponentialhistogram)
by default. See `histogram_aggregation` in the [OTEL metrics exporter](../export-data/) section for more information.
2 changes: 2 additions & 0 deletions pkg/beyla/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ func DefaultConfig() *Config {
{InstrumentableType: svc.InstrumentableNodejs},
{InstrumentableType: svc.InstrumentablePython},
}
// Overrides histogram configuration to use exponential/native histograms by default
def.OTELMetrics.HistogramAggregation = otelcfg.HistogramAggregationExponential

def.Routes.Unmatch = transform.UnmatchLowCardinality

Expand Down
Loading