Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
29 changes: 29 additions & 0 deletions docs/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,35 @@ The following encryption methods are supported:
| `tls` | Enable TLS |
| `mtls` | Enable mutual TLS |

## Metrics Export

The `metrics_export` configuration enables exporting Prometheus metrics via OTLP to an OpenTelemetry Collector, independently of distributed tracing.

```yaml
metrics_export:
type: otlp/http
address: localhost:4318
export_interval_ms: 5000
service_name: opa
encryption: "off"
allow_insecure_tls: false
tls_ca_cert_file: /path/to/ca.pem
tls_cert_file: /path/to/cert.pem
tls_private_key_file: /path/to/key.pem
```

| Field | Type | Required | Description |
| ------------------------------------- | -------- | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `metrics_export.type` | `string` | No | `"otlp/grpc"` or `"otlp/http"`. Omit (or `""`) to disable metrics export. |
| `metrics_export.address` | `string` | No (default: `localhost:4317` if `type` is `otlp/grpc`, `localhost:4318` if `type` is `otlp/http`) | Address of the OpenTelemetry Collector endpoint. |
| `metrics_export.export_interval_ms` | `int` | No (default: `60000`) | Interval between metric exports in milliseconds. Must be > 0. |
| `metrics_export.service_name` | `string` | No (default: `opa`) | Logical name of the service reported in exported metrics. |
| `metrics_export.encryption` | `string` | No (default: `off`) | Configures TLS: `off`, `tls`, or `mtls`. |
| `metrics_export.allow_insecure_tls` | `bool` | No (default: `false`) | Allow insecure TLS. |
| `metrics_export.tls_ca_cert_file` | `string` | No | The path to the root CA certificate. |
| `metrics_export.tls_cert_file` | `string` | No (unless `encryption` equals `mtls`) | The path to the client certificate to authenticate with. |
| `metrics_export.tls_private_key_file` | `string` | No (unless `tls_cert_file` provided) | The path to the private key of the client certificate. |

## Disk Storage

The `storage` configuration key allows for enabling, and configuring, the
Expand Down
44 changes: 24 additions & 20 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/agnivade/levenshtein v1.2.1
github.com/bytecodealliance/wasmtime-go/v39 v39.0.1
github.com/cespare/xxhash/v2 v2.3.0
github.com/containerd/containerd/v2 v2.2.2
github.com/containerd/containerd/v2 v2.2.1
github.com/containerd/errdefs v1.0.0
github.com/dgraph-io/badger/v4 v4.9.1
github.com/fortytw2/leaktest v1.3.0
Expand All @@ -17,7 +17,7 @@ require (
github.com/google/go-cmp v0.7.0
github.com/google/uuid v1.6.0
github.com/hashicorp/golang-lru/v2 v2.0.7
github.com/huandu/go-sqlbuilder v1.40.0
github.com/huandu/go-sqlbuilder v1.39.1
github.com/lestrrat-go/jwx/v3 v3.0.13
github.com/olekukonko/tablewriter v1.1.0
github.com/opencontainers/go-digest v1.0.0
Expand All @@ -35,18 +35,23 @@ require (
github.com/vektah/gqlparser/v2 v2.5.32
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415
github.com/yashtewari/glob-intersection v0.2.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0
go.opentelemetry.io/otel v1.42.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.42.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.42.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.42.0
go.opentelemetry.io/otel/sdk v1.42.0
go.opentelemetry.io/otel/trace v1.42.0
go.opentelemetry.io/contrib/bridges/prometheus v0.65.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.65.0
go.opentelemetry.io/otel v1.40.0
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.40.0
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.40.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.40.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.40.0
go.opentelemetry.io/otel/sdk v1.40.0
go.opentelemetry.io/otel/sdk/metric v1.40.0
go.opentelemetry.io/otel/trace v1.40.0
go.opentelemetry.io/proto/otlp v1.9.0
go.uber.org/automaxprocs v1.6.0
go.yaml.in/yaml/v3 v3.0.4
golang.org/x/net v0.52.0
golang.org/x/net v0.51.0
golang.org/x/sync v0.20.0
golang.org/x/text v0.35.0
golang.org/x/text v0.34.0
golang.org/x/time v0.15.0
google.golang.org/grpc v1.79.3
google.golang.org/protobuf v1.36.11
Expand Down Expand Up @@ -99,8 +104,8 @@ require (
github.com/olekukonko/ll v0.0.9 // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/common v0.66.1 // indirect
github.com/prometheus/procfs v0.17.0 // indirect
github.com/prometheus/common v0.67.5 // indirect
github.com/prometheus/procfs v0.20.1 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rogpeppe/go-internal v1.14.1 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
Expand All @@ -113,13 +118,12 @@ require (
github.com/valyala/fastjson v1.6.7 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/otel/metric v1.42.0 // indirect
go.opentelemetry.io/proto/otlp v1.9.0 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
golang.org/x/crypto v0.49.0 // indirect
golang.org/x/mod v0.33.0 // indirect
golang.org/x/sys v0.42.0 // indirect
golang.org/x/tools v0.42.0 // indirect
go.opentelemetry.io/otel/metric v1.40.0 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
golang.org/x/crypto v0.48.0 // indirect
golang.org/x/mod v0.32.0 // indirect
golang.org/x/sys v0.41.0 // indirect
golang.org/x/tools v0.41.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260209200024-4cfbd4190f57 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260209200024-4cfbd4190f57 // indirect
)
Expand Down
Loading
Loading