Skip to content

Commit

Permalink
Update filelog receiver configuration (#201)
Browse files Browse the repository at this point in the history
* Update filelog receiver configuration

* Fix typo
  • Loading branch information
TylerHelmuth authored May 10, 2022
1 parent 288f238 commit 48cb4f3
Show file tree
Hide file tree
Showing 27 changed files with 117 additions and 80 deletions.
2 changes: 1 addition & 1 deletion charts/opentelemetry-collector/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: opentelemetry-collector
version: 0.16.1
version: 0.16.2
description: OpenTelemetry Collector Helm chart for Kubernetes
type: application
home: https://opentelemetry.io/
Expand Down
11 changes: 11 additions & 0 deletions charts/opentelemetry-collector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,14 @@ mode: daemonset
containerLogs:
enabled: true
config:
service:
pipelines:
logs:
receivers:
- otlp
- filelog
image:
repository: otel/opentelemetry-collector-contrib
Expand Down Expand Up @@ -172,6 +180,9 @@ config:
service:
pipelines:
logs:
receivers:
- otlp
- filelog
exporters:
- otlphttp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ config:
receivers:
filelog:
exclude: []
service:
pipelines:
logs:
receivers:
- otlp
- filelog
resources:
limits:
cpu: 100m
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ConfigMap
metadata:
name: example-opentelemetry-collector-agent
labels:
helm.sh/chart: opentelemetry-collector-0.16.1
helm.sh/chart: opentelemetry-collector-0.16.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.50.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ConfigMap
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.16.1
helm.sh/chart: opentelemetry-collector-0.16.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.50.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: DaemonSet
metadata:
name: example-opentelemetry-collector-agent
labels:
helm.sh/chart: opentelemetry-collector-0.16.1
helm.sh/chart: opentelemetry-collector-0.16.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.50.0"
Expand All @@ -19,7 +19,7 @@ spec:
template:
metadata:
annotations:
checksum/config: 713577fe11046c2deec7b1952bfefd7d86ca5379431c1dfd431339bf0d8d0551
checksum/config: f992878f8497ab2f75d1e8cc3e4ce4b3bbf6a7aaaaeff8b849e510fac83e24fd

labels:
app.kubernetes.io/name: opentelemetry-collector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: Deployment
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.16.1
helm.sh/chart: opentelemetry-collector-0.16.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.50.0"
Expand All @@ -21,7 +21,7 @@ spec:
template:
metadata:
annotations:
checksum/config: 8eb401829f097268e521bdff92eb4ccacbdb9cc3a7cc7c8cab7c381592bdbeb7
checksum/config: bf8937afccd9c99f0c18c953701b053814d8198793b256c0256312f4bb239ecf

labels:
app.kubernetes.io/name: opentelemetry-collector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: Service
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.16.1
helm.sh/chart: opentelemetry-collector-0.16.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.50.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ServiceAccount
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.16.1
helm.sh/chart: opentelemetry-collector-0.16.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.50.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ConfigMap
metadata:
name: example-opentelemetry-collector-agent
labels:
helm.sh/chart: opentelemetry-collector-0.16.1
helm.sh/chart: opentelemetry-collector-0.16.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.50.0"
Expand Down Expand Up @@ -34,52 +34,62 @@ data:
operators:
- id: get-format
routes:
- expr: $$body matches "^\\{"
- expr: body matches "^\\{"
output: parser-docker
- expr: $$body matches "^[^ Z]+ "
- expr: body matches "^[^ Z]+ "
output: parser-crio
- expr: $$body matches "^[^ Z]+Z"
- expr: body matches "^[^ Z]+Z"
output: parser-containerd
type: router
- id: parser-crio
output: extract_metadata_from_filepath
regex: ^(?P<time>[^ Z]+) (?P<stream>stdout|stderr) (?P<logtag>[^ ]*) (?P<log>.*)$
regex: ^(?P<time>[^ Z]+) (?P<stream>stdout|stderr) (?P<logtag>[^ ]*) ?(?P<log>.*)$
timestamp:
layout: "2006-01-02T15:04:05.000000000-07:00"
layout_type: gotime
parse_from: time
parse_from: attributes.time
type: regex_parser
- id: parser-containerd
output: extract_metadata_from_filepath
regex: ^(?P<time>[^ ^Z]+Z) (?P<stream>stdout|stderr) (?P<logtag>[^ ]*) (?P<log>.*)$
regex: ^(?P<time>[^ ^Z]+Z) (?P<stream>stdout|stderr) (?P<logtag>[^ ]*) ?(?P<log>.*)$
timestamp:
layout: '%Y-%m-%dT%H:%M:%S.%LZ'
parse_from: time
parse_from: attributes.time
type: regex_parser
- id: parser-docker
output: extract_metadata_from_filepath
timestamp:
layout: '%Y-%m-%dT%H:%M:%S.%LZ'
parse_from: time
parse_from: attributes.time
type: json_parser
- id: extract_metadata_from_filepath
parse_from: $$attributes["file.path"]
regex: ^.*\/(?P<namespace>[^_]+)_(?P<pod_name>[^_]+)_(?P<uid>[a-f0-9\-]+)\/(?P<container_name>[^\._]+)\/(?P<run_id>\d+)\.log$
parse_from: attributes["log.file.path"]
regex: ^.*\/(?P<namespace>[^_]+)_(?P<pod_name>[^_]+)_(?P<uid>[a-f0-9\-]{36})\/(?P<container_name>[^\._]+)\/(?P<restart_count>\d+)\.log$
type: regex_parser
- attributes:
k8s.container.name: EXPR($.container_name)
k8s.namespace.name: EXPR($.namespace)
k8s.pod.name: EXPR($.pod_name)
k8s.pod.uid: EXPR($.uid)
run_id: EXPR($.run_id)
stream: EXPR($.stream)
type: metadata
- id: clean-up-log-body
ops:
- move:
from: log
to: $
type: restructure
- from: attributes.stream
to: attributes["log.iostream"]
type: move
- from: attributes.container_name
to: attributes["k8s.container.name"]
type: move
- from: attributes.namespace
to: attributes["k8s.namespace.name"]
type: move
- from: attributes.pod_name
to: attributes["k8s.pod.name"]
type: move
- from: attributes.restart_count
to: attributes["k8s.container.restart_count"]
type: move
- from: attributes.run_id
to: attributes["run_id"]
type: move
- from: attributes.uid
to: attributes["k8s.pod.uid"]
type: move
- from: attributes.log
to: body
type: move
start_at: beginning
jaeger:
protocols:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: DaemonSet
metadata:
name: example-opentelemetry-collector-agent
labels:
helm.sh/chart: opentelemetry-collector-0.16.1
helm.sh/chart: opentelemetry-collector-0.16.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.50.0"
Expand All @@ -19,7 +19,7 @@ spec:
template:
metadata:
annotations:
checksum/config: 80f2c463cd90f2e909d0da9de8b0aa3ac9bfe552a9db04251d767ccdd6d16bee
checksum/config: bba9fc0f6b30a41fac8951cb22f41ea66d24f803770b7d10a64bd9b01222c8ba

labels:
app.kubernetes.io/name: opentelemetry-collector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ServiceAccount
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.16.1
helm.sh/chart: opentelemetry-collector-0.16.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.50.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ConfigMap
metadata:
name: example-opentelemetry-collector-agent
labels:
helm.sh/chart: opentelemetry-collector-0.16.1
helm.sh/chart: opentelemetry-collector-0.16.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.50.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: DaemonSet
metadata:
name: example-opentelemetry-collector-agent
labels:
helm.sh/chart: opentelemetry-collector-0.16.1
helm.sh/chart: opentelemetry-collector-0.16.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.50.0"
Expand All @@ -19,7 +19,7 @@ spec:
template:
metadata:
annotations:
checksum/config: 7108631ccd4751eecdc712c88ad4fdf416d396f3b7f3febb33eb52de6a58be88
checksum/config: e3ec60ebf906e9bc9825fcc883dd30d3555c1aaa0acb6fb8e6e84ee1eb7be6f4

labels:
app.kubernetes.io/name: opentelemetry-collector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ServiceAccount
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.16.1
helm.sh/chart: opentelemetry-collector-0.16.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.50.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ConfigMap
metadata:
name: example-opentelemetry-collector-agent
labels:
helm.sh/chart: opentelemetry-collector-0.16.1
helm.sh/chart: opentelemetry-collector-0.16.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.50.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: DaemonSet
metadata:
name: example-opentelemetry-collector-agent
labels:
helm.sh/chart: opentelemetry-collector-0.16.1
helm.sh/chart: opentelemetry-collector-0.16.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.50.0"
Expand All @@ -19,7 +19,7 @@ spec:
template:
metadata:
annotations:
checksum/config: ca0b8226a268f0bf5b53fd5aa7df87f527fe60b5c6ff0b78ea8390f3f5fec5a4
checksum/config: bef42de2e234ff240846e02aa6556fd839c330484547baea16d5562a9375a327

labels:
app.kubernetes.io/name: opentelemetry-collector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ServiceAccount
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.16.1
helm.sh/chart: opentelemetry-collector-0.16.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.50.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ConfigMap
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.16.1
helm.sh/chart: opentelemetry-collector-0.16.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.50.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: Deployment
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.16.1
helm.sh/chart: opentelemetry-collector-0.16.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.50.0"
Expand All @@ -21,7 +21,7 @@ spec:
template:
metadata:
annotations:
checksum/config: 95cf2c1adc62b15269f55a791a008c896d364e2c4a8d4a10cf825eab0aa447e2
checksum/config: b3de3b2267b89eaec622f156426875f0a63b09d2700e12811cda41c340bfc4c4

labels:
app.kubernetes.io/name: opentelemetry-collector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: Service
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.16.1
helm.sh/chart: opentelemetry-collector-0.16.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.50.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ServiceAccount
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.16.1
helm.sh/chart: opentelemetry-collector-0.16.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.50.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ConfigMap
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.16.1
helm.sh/chart: opentelemetry-collector-0.16.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.50.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: Deployment
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.16.1
helm.sh/chart: opentelemetry-collector-0.16.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.50.0"
Expand All @@ -21,7 +21,7 @@ spec:
template:
metadata:
annotations:
checksum/config: e6b0b7e4e0d45a9fe62d350ced199418accf8add8bf3e965074fc11ad6c058ef
checksum/config: 58c121bd57099f1cc41c67bad39cfaaf9e1747ba0422c4b84b980f037c8c0ccb

labels:
app.kubernetes.io/name: opentelemetry-collector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: Service
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.16.1
helm.sh/chart: opentelemetry-collector-0.16.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.50.0"
Expand Down
Loading

0 comments on commit 48cb4f3

Please sign in to comment.