Skip to content

Commit 5cf5ef2

Browse files
committed
Fix #60: OTEL -> OTel
Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>
1 parent 29e0801 commit 5cf5ef2

File tree

11 files changed

+39
-187
lines changed

11 files changed

+39
-187
lines changed

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
## `OTEL <--> KEDA` add-on
1+
## `OTel <--> KEDA` add-on
22

33
[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/otel-add-on)](https://artifacthub.io/packages/search?repo=otel-add-on)
44

55
### Description
66

7-
This is an external scaler for KEDA that intergrates with OpenTelemetry (OTEL) collector. The helm chart deploys also OTEL
7+
This is an external scaler for KEDA that intergrates with OpenTelemetry (OTel) collector. The helm chart deploys also OTel
88
collector (using the [upstream helm chart](https://github.com/open-telemetry/opentelemetry-helm-charts)) where one can set up
99
filtering so that scaler receives only those metrics that are needed for scaling decisions
1010
([example](https://github.com/kedify/otel-add-on/blob/v0.0.0-1/helmchart/otel-add-on/values.yaml#L133-L147)).
@@ -41,7 +41,7 @@ ScaledObject CR, and it provides a limited subset of features as PromQL.
4141
- [1] [OTLP format](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc)
4242
- [2] [OTLP metric receiver](https://github.com/open-telemetry/opentelemetry-collector/blob/d17559b6e89a6f97b6800a6538bbf82430d94678/receiver/otlpreceiver/otlp.go#L101)
4343
- [3] [processors](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor)
44-
- [4] https://opencensus.io - obsolete, will be replaced by OTEL
44+
- [4] https://opencensus.io - obsolete, will be replaced by OTel
4545
- [5] [OpenCensus receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/opencensusreceiver)
4646
- [6] [Prometheus receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/prometheusreceiver)
4747
- [7] [OTLP exporter](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/otlpexporter/README.md)
@@ -50,21 +50,21 @@ ScaledObject CR, and it provides a limited subset of features as PromQL.
5050

5151
#### 1. convert and react on metrics from OpenCensus
5252

53-
By specifying an [opencensus receiver](https://github.com/kedify/otel-add-on/blob/v0.0.0-1/helmchart/otel-add-on/values.yaml#L112) in the helm chart values for OTEL collector,
53+
By specifying an [opencensus receiver](https://github.com/kedify/otel-add-on/blob/v0.0.0-1/helmchart/otel-add-on/values.yaml#L112) in the helm chart values for OTel collector,
5454
we will get the ability to get those metrics into our scaler.
5555

5656
#### 2. convert and react on metrics from any other upstream receiver
57-
OTEL collector contains [numerous](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver) integrations on the receiver part.
58-
All of these various receivers open new ways of how to turn metric from OTEL receiver into KEDA scaler. For instance by using
57+
OTel collector contains [numerous](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver) integrations on the receiver part.
58+
All of these various receivers open new ways of how to turn metric from OTel receiver into KEDA scaler. For instance by using
5959
[sqlqueryreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/sqlqueryreceiver), one can achieve similar goals as with
6060
[MySQL](https://keda.sh/docs/2.15/scalers/mysql/) or [PostgreSQL](https://keda.sh/docs/2.15/scalers/postgresql/) scalers.
6161
By using [githubreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/githubreceiver), one can hook to
6262
metrics from GitBub, etc.
6363

6464
#### 3. process the metrics before reaching the scaler
65-
OTEL collector provides [various processors](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor)
65+
OTel collector provides [various processors](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor)
6666
that are being applied on all incoming metrics/spans/traces and one achieve for instance metric [filtering](https://github.com/kedify/otel-add-on/blob/v0.0.0-1/helmchart/otel-add-on/values.yaml#L138-L143)
67-
this way. So that not all the metric data are passed to scaler's short term memory. This way we can keep the OTEL scaler pretty lightweight.
67+
this way. So that not all the metric data are passed to scaler's short term memory. This way we can keep the OTel scaler pretty lightweight.
6868

6969
OTTL lang:
7070
- [spec](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/ottl/LANGUAGE.md)
@@ -74,9 +74,9 @@ If the simple metric query is not enough and one requires to combine multiple me
7474
arithmetic operations on the metrics, there is the [Metrics Generation Processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/metricsgenerationprocessor)
7575
available as an option
7676

77-
#### 4. OTEL patterns (metric pipelines)
78-
Basically any scenario described in [OTEL patterns](https://github.com/jpkrohling/opentelemetry-collector-deployment-patterns) or [architecture](https://opentelemetry.io/docs/collector/architecture/)
79-
should be supported. So no matter how the OTEL collectors are deployed, whether it's a fleet of sidecar containers deployed alongside each workload or
77+
#### 4. OTel patterns (metric pipelines)
78+
Basically any scenario described in [OTel patterns](https://github.com/jpkrohling/opentelemetry-collector-deployment-patterns) or [architecture](https://opentelemetry.io/docs/collector/architecture/)
79+
should be supported. So no matter how the OTel collectors are deployed, whether it's a fleet of sidecar containers deployed alongside each workload or
8080
some complex pipeline that spans multiple Kubernetes clusters, you will be covered.
8181

8282
## Installation
@@ -131,9 +131,9 @@ curl -X 'GET' \
131131
}
132132
```
133133

134-
### Configuration for OTEL collector
134+
### Configuration for OTel collector
135135

136-
This repo has the OTEL collector helm chart as a dependency and some issues in the configuration are guarded
136+
This repo has the OTel collector helm chart as a dependency and some issues in the configuration are guarded
137137
by their upstream JSON Schema, but some are not, and it's a good idea to run the validator (especially if it's part
138138
of a CI/CD pipeline):
139139

artifacthub/otel-add-on-scaler/0.0.5/README.md

Lines changed: 0 additions & 149 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../README.md

examples/dapr/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ upstream [example](https://docs.dapr.io/getting-started/quickstarts/serviceinvoc
77
where the Python app calls the Node app using the service invocation pattern.
88

99
Both workloads run `daprd` in a sidecar container, which also exposes metrics. We have modified the `daprd` and its
10-
mutating webhook (`dapr-sidecar-injector`) to push metrics to our OTEL collector. These metrics use OpenCensus,
11-
so we need to configure the OTEL collector to accept metrics through the `opencensus` receiver.
10+
mutating webhook (`dapr-sidecar-injector`) to push metrics to our OTel collector. These metrics use OpenCensus,
11+
so we need to configure the OTel collector to accept metrics through the `opencensus` receiver.
1212

1313
## Setup
1414

@@ -32,7 +32,7 @@ kubectl set image deploy/dapr-sidecar-injector -n dapr-system dapr-sidecar-injec
3232
kubectl rollout status -n dapr-system deploy/dapr-sidecar-injector
3333
```
3434

35-
Deploy this scaler and OTEL collector that forwards one whitelisted metric:
35+
Deploy this scaler and OTel collector that forwards one whitelisted metric:
3636
```bash
3737
cat <<VALUES | helm upgrade -i kedify-otel oci://ghcr.io/kedify/charts/otel-add-on --version=v0.0.5 -f -
3838
opentelemetry-collector:
@@ -118,7 +118,7 @@ operationOverTime: 'rate'
118118
- The runtime_service_invocation_req_recv_total metric increments each time the `pythonapp` calls `nodeapp`.
119119
- One of the metric dimensions is the pod identity, meaning each pod exposes these metrics with its label attached.
120120
- Similar to PromQL, if not all dimensions are specified, multiple metric series will be returned.
121-
- The OTEL scaler calculates the rate over a one-minute window (default). This should be `1`, as we are calling the API
121+
- The OTel scaler calculates the rate over a one-minute window (default). This should be `1`, as we are calling the API
122122
every second, so the counter increments by one each second.
123123
- If multiple metric series are present, the sum is applied to aggregate the values. For example, if there are three
124124
producer pods, the total will be `3`.

examples/metric-pull/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Use-case: pull metrics
22

3-
This use-case demonstrates how OTEL collector can be used as a scraper of another metric endpoints and
3+
This use-case demonstrates how OTel collector can be used as a scraper of another metric endpoints and
44
then forwarding the filtered metrics into OTLP receiver in our scaler.
55

66
Prepare helm chart repos:
@@ -30,7 +30,7 @@ Install this addon:
3030
helm upgrade -i kedify-otel oci://ghcr.io/kedify/charts/otel-add-on --version=v0.0.5 -f scaler-with-collector-pull-values.yaml
3131
```
3232

33-
Note the following section in the helm chart values that configures the OTEL collector to scrape targets:
33+
Note the following section in the helm chart values that configures the OTel collector to scrape targets:
3434

3535
```yaml
3636
...
@@ -65,7 +65,7 @@ Note the following section in the helm chart values that configures the OTEL col
6565
target_label: pod_name
6666
...
6767
```
68-
We are adding one static target - the metrics from the OTEL collector itself, just for demo purposes, these
68+
We are adding one static target - the metrics from the OTel collector itself, just for demo purposes, these
6969
won't be used for scaling decision. And also any pod annotated with `prometheus.io/scrape=true`. One can
7070
also modify the path where the metrics are exported using `prometheus.io/path=/metrics`.
7171

examples/metric-push/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Use-case: push metrics
22

3-
This use-case demonstrates how OTEL collector can be used as a scraper of another metric endpoints and
3+
This use-case demonstrates how OTel collector can be used as a scraper of another metric endpoints and
44
then forwarding the filtered metrics into OTLP receiver in our scaler.
55

66
Prepare helm chart repos:
@@ -31,22 +31,22 @@ Install this addon:
3131
helm upgrade -i kedify-otel oci://ghcr.io/kedify/charts/otel-add-on --version=v0.0.5 -f scaler-only-push-values.yaml
3232
```
3333

34-
In this scenario, we don't install OTEL collector using the `kedify-otel/otel-add-on` helm chart, because
34+
In this scenario, we don't install OTel collector using the `kedify-otel/otel-add-on` helm chart, because
3535
the `opentelemetry-demo` already creates one and it was configured to forward all metrics to our scaler.
36-
If we wanted to filter the metrics, we would need to deploy another OTEL collector and configure the processor
36+
If we wanted to filter the metrics, we would need to deploy another OTel collector and configure the processor
3737
there so that it would look like this:
3838

3939
```bash
4040
┌────────────┐ ┌────────────┐ ┌─────────────┐
4141
│ │ │ │ │ │
42-
OTEL col 1 ├────►│ OTEL col 2 ├────►│ this scaler │
42+
OTel col 1 ├────►│ OTel col 2 ├────►│ this scaler │
4343
│ │ │ (filtering)│ │ │
4444
└────────────┘ └────────────┘ └─────────────┘
4545

4646
instead we go w/ simple (w/o filtering):
4747
┌────────────┐ ┌─────────────┐
4848
│ │ │ │
49-
OTEL col 1 ├────►│ this scaler │
49+
OTel col 1 ├────►│ this scaler │
5050
│ │ │ │
5151
└────────────┘ └─────────────┘
5252
```
@@ -98,6 +98,6 @@ k3d cluster delete metric-push
9898
```
9999

100100
> [!TIP]
101-
> In general, when instrumenting the application using OTEL sdk, you can call the
101+
> In general, when instrumenting the application using OTel sdk, you can call the
102102
> [ForceFlush](https://opentelemetry.io/docs/specs/otel/metrics/sdk/#forceflush-1)
103103
> to further decrease the delay between a metric change and scaling trigger.

0 commit comments

Comments
 (0)