Skip to content

Commit ed68f72

Browse files
committed
add example for OTLP logging via stdout and k8s
1 parent 899c6d0 commit ed68f72

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

logging-k8s-stdout-otlp-json/README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,22 @@ This example contains
1515
[experimental-otlp/stdout](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md#in-development-exporter-selection) logs exporter
1616
- a OTel collector configuration that uses the
1717
[OTLP/JSON connector](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/connector/otlpjsonconnector) to turn Pod logs into `OTLP`
18-
18+
19+
## Architecture
1920

2021
![OTLP/JSON Architecture](otlpjson-architecture.png)
2122

23+
The OTel Collector pipeline:
24+
25+
![OTel Collector Pipeline](otel-collector-otlpjson-pipeline.png)
26+
2227
## Getting Started
2328

2429
The k8s directory contains the Kubernetes manifests to deploy the application and the collector.
2530

26-
Ignore the `lgtm.yaml` file, which is only used for running locally and automated testing
27-
using [OATs](https://github.com/grafana/oats).
31+
Ignore the `lgtm.yaml` file, which is only used for running locally with
32+
[LGTM](https://github.com/grafana/docker-otel-lgtm/)
33+
and automated testing using [OATs](https://github.com/grafana/oats).
2834

2935
## Running locally
3036

logging-k8s-stdout-otlp-json/k8s/collector-configmap.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ data:
3232
override: false
3333
3434
k8sattributes:
35-
# Config details in
36-
# https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/k8sattributesprocessor
37-
``
35+
# Config details in
36+
# https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/k8sattributesprocessor
3837
connectors:
3938
otlpjson:
4039
@@ -57,11 +56,11 @@ data:
5756
pipelines:
5857
traces:
5958
receivers: [ otlp ]
60-
processors: [k8sattributes, resourcedetection, batch]
59+
processors: [ k8sattributes, resourcedetection, batch ]
6160
exporters: [ otlphttp/traces ]
6261
metrics:
6362
receivers: [ otlp, prometheus/collector ]
64-
processors: [k8sattributes, resourcedetection, batch]
63+
processors: [ k8sattributes, resourcedetection, batch ]
6564
exporters: [ otlphttp/metrics ]
6665
logs/raw_otlpjson:
6766
receivers: [ filelog/otlp-json-logs ]
@@ -71,6 +70,6 @@ data:
7170
exporters: [ otlpjson ]
7271
logs/otlp:
7372
receivers: [ otlp, otlpjson ]
74-
processors: [k8sattributes, resourcedetection, batch]
73+
processors: [ k8sattributes, resourcedetection, batch ]
7574
exporters: [ otlphttp/logs ]
7675
# exporters: [ otlphttp/logs, debug/logs ] # Uncomment this line to enable debug logging
Loading

0 commit comments

Comments
 (0)