Skip to content

Commit

Permalink
Add OAuth2 to all destinations
Browse files Browse the repository at this point in the history
Also add an integration test that checks all authentication formats

Signed-off-by: Pete Wall <pete.wall@grafana.com>
  • Loading branch information
petewall committed Nov 25, 2024
1 parent b76ed41 commit ae9c2e7
Show file tree
Hide file tree
Showing 40 changed files with 952 additions and 472 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{/* Inputs: Values (values) metricsOutput, logsOutput, tracesOutput, name */}}
{{- define "feature.applicationObservability.processor.batch.alloy.target" }}otelcol.processor.batch.{{ .name | default "default" }}.input{{ end }}
{{- define "feature.applicationObservability.processor.batch.alloy" }}
otelcol.processor.batch "{{ .name | default "default" }}" {
otelcol.processor.batch {{ .name | default "default" | quote }} {
output {
{{- if and .metricsOutput .Values.metrics.enabled }}
metrics = {{ .metricsOutput }}
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
70 changes: 37 additions & 33 deletions charts/k8s-monitoring/destinations/otlp-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,23 @@ name: ""
# @section -- General
protocol: "grpc"

traces:
# -- Whether to send traces to the OTLP destination.
# @section -- Telemetry
enabled: true

metrics:
# -- Whether to send metrics to the OTLP destination.
# @default -- `true`
# @section -- Telemetry
enabled: false
enabled:

logs:
# -- Whether to send logs to the OTLP destination.
# @default -- `true`
# @section -- Telemetry
enabled:

traces:
# -- Whether to send traces to the OTLP destination.
# @default -- `true`
# @section -- Telemetry
enabled: false
enabled:

# -- The URL for the OTLP destination.
# @section -- General
Expand Down Expand Up @@ -196,6 +199,32 @@ writeBufferSize: ""

# -- Processors to apply to the data before sending it.
processors:
attributes:
# -- Attribute processor actions
# Format: { key: "", value: "", action: "", pattern: "", fromAttribute: "", fromContext: "", convertedType: "" }
# @section -- Attributes Processor
actions: []

transform:
# -- Metric transforms
# @section -- Transform Processor
metrics:
resource: []
metric: []
datapoint: []

# -- Log transforms
# @section -- Transform Processor
logs:
resource: []
log: []

# -- Trace transforms
# @section -- Transform Processor
traces:
resource: []
span: []
spanevent: []
batch:
# -- Whether to use a batch processor.
# @section -- Batch Processor
Expand All @@ -212,35 +241,10 @@ processors:
memoryLimiter:
# -- Whether to use a memory limiter.
# @section -- Memory Limiter
enabled: true
enabled: false
# -- How often to check memory usage.
# @section -- Memory Limiter
checkInterval: 1s
# -- Maximum amount of memory targeted to be allocated by the process heap.
# @section -- Memory Limiter
limit: 0MiB
transform:
# -- Whether to use a transform processor.
# @section -- Transform Processor
enabled: false

# -- Metric transforms
# @section -- Transform Processor
metrics:
resource: []
metric: []
datapoint: []

# -- Log transforms
# @section -- Transform Processor
log:
resource: []
log: []
labels: []

# -- Trace transforms
# @section -- Transform Processor
traces:
resource: []
span: []
spanevent: []
19 changes: 12 additions & 7 deletions charts/k8s-monitoring/docs/destinations/otlp.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,15 @@ This defines the options for defining a destination for OpenTelemetry data that

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| logs.enabled | bool | `false` | Whether to send logs to the OTLP destination. |
| metrics.enabled | bool | `false` | Whether to send metrics to the OTLP destination. |
| traces.enabled | bool | `true` | Whether to send traces to the OTLP destination. |
| logs.enabled | string | `true` | Whether to send logs to the OTLP destination. |
| metrics.enabled | string | `true` | Whether to send metrics to the OTLP destination. |
| traces.enabled | string | `true` | Whether to send traces to the OTLP destination. |

### Attributes Processor

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| processors.attributes.actions | list | `[]` | Attribute processor actions Format: { key: "", value: "", action: "", pattern: "", fromAttribute: "", fromContext: "", convertedType: "" } |

### Batch Processor

Expand All @@ -86,15 +92,14 @@ This defines the options for defining a destination for OpenTelemetry data that
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| processors.memoryLimiter.checkInterval | string | `"1s"` | How often to check memory usage. |
| processors.memoryLimiter.enabled | bool | `true` | Whether to use a memory limiter. |
| processors.memoryLimiter.enabled | bool | `false` | Whether to use a memory limiter. |
| processors.memoryLimiter.limit | string | `"0MiB"` | Maximum amount of memory targeted to be allocated by the process heap. |

### Transform Processor

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| processors.transform.enabled | bool | `false` | Whether to use a transform processor. |
| processors.transform.log | object | `{"labels":[],"log":[],"resource":[]}` | Log transforms |
| processors.transform.logs | object | `{"log":[],"resource":[]}` | Log transforms |
| processors.transform.metrics | object | `{"datapoint":[],"metric":[],"resource":[]}` | Metric transforms |
| processors.transform.traces | object | `{"resource":[],"span":[],"spanevent":[]}` | Trace transforms |

Expand Down Expand Up @@ -127,4 +132,4 @@ This defines the options for defining a destination for OpenTelemetry data that

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| processors | object | `{"batch":{"enabled":true,"maxSize":0,"size":8192,"timeout":"2s"},"memoryLimiter":{"checkInterval":"1s","enabled":true,"limit":"0MiB"},"transform":{"enabled":false,"log":{"labels":[],"log":[],"resource":[]},"metrics":{"datapoint":[],"metric":[],"resource":[]},"traces":{"resource":[],"span":[],"spanevent":[]}}}` | Processors to apply to the data before sending it. |
| processors | object | `{"attributes":{"actions":[]},"batch":{"enabled":true,"maxSize":0,"size":8192,"timeout":"2s"},"memoryLimiter":{"checkInterval":"1s","enabled":false,"limit":"0MiB"},"transform":{"logs":{"log":[],"resource":[]},"metrics":{"datapoint":[],"metric":[],"resource":[]},"traces":{"resource":[],"span":[],"spanevent":[]}}}` | Processors to apply to the data before sending it. |

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 30 additions & 21 deletions charts/k8s-monitoring/docs/examples/auth/bearer-token/output.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ae9c2e7

Please sign in to comment.