Skip to content

Commit

Permalink
feat: add pprof extension for otelcol
Browse files Browse the repository at this point in the history
The performance cost of this extension is negligible, and it really
helps with live profiling and debugging.
  • Loading branch information
Mikołaj Świątek committed Mar 7, 2022
1 parent 214a777 commit 9bf45ca
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- feat: add pprof extension for otelcol [#2173][#2173]

### Changed

- feat(tracing): change otlp http receiver default port to 4318 [#2170][#2170]
Expand All @@ -19,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[Unreleased]: https://github.com/SumoLogic/sumologic-kubernetes-collection/compare/v2.6.0...main
[#2170]: https://github.com/SumoLogic/sumologic-kubernetes-collection/pull/2170
[#2177]: https://github.com/SumoLogic/sumologic-kubernetes-collection/pull/2177
[#2173]: https://github.com/SumoLogic/sumologic-kubernetes-collection/pull/2173

## [v2.6.0][v2.6.0]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ spec:
fieldPath: metadata.namespace
securityContext:
{{- toYaml .Values.otellogs.daemonset.containers.otelcol.securityContext | nindent 10 }}
ports:
- name: pprof
containerPort: 1777
protocol: TCP
initContainers: # ensure the host path is owned by the otel user group
- name: changeowner
image: busybox
Expand Down
3 changes: 3 additions & 0 deletions deploy/helm/sumologic/templates/logs/otelcol/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ spec:
- name: otlphttp
containerPort: 4318
protocol: TCP
- name: pprof
containerPort: 1777
protocol: TCP
livenessProbe:
httpGet:
path: /
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ spec:
- name: metrics
containerPort: 8888
protocol: TCP
- name: pprof
containerPort: 1777
protocol: TCP
{{- end }}
livenessProbe:
httpGet:
Expand Down
7 changes: 6 additions & 1 deletion deploy/helm/sumologic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3643,6 +3643,7 @@ metadata:
file_storage:
directory: /var/lib/storage/otc
timeout: 10s
pprof: {}
exporters:
## Configuration for Sumo Logic Exporter
## ref: https://github.com/SumoLogic/sumologic-otel-collector/blob/main/pkg/exporter/sumologicexporter
Expand Down Expand Up @@ -3926,6 +3927,7 @@ metadata:
extensions:
- health_check
- file_storage
- pprof
pipelines:
metrics:
receivers:
Expand Down Expand Up @@ -4041,6 +4043,7 @@ metadata:
file_storage:
directory: /var/lib/storage/otc
timeout: 10s
pprof: {}
exporters:
sumologic/containers:
log_format: json
Expand Down Expand Up @@ -4275,7 +4278,7 @@ metadata:
extensions:
- health_check
- file_storage
# - sumologic
- pprof
pipelines:
logs/fluent/containers:
receivers:
Expand Down Expand Up @@ -4430,13 +4433,15 @@ otellogs:
file_storage:
directory: /var/lib/storage/otc
timeout: 10s
pprof: {}
service:
telemetry:
logs:
level: '{{ .Values.otellogs.logLevel }}'
extensions:
- health_check
- file_storage
- pprof
pipelines:
logs/containers:
receivers:
Expand Down
2 changes: 2 additions & 0 deletions tests/helm/logs_otc/static/basic.output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ data:
directory: /var/lib/storage/otc
timeout: 10s
health_check: {}
pprof: {}
processors:
batch:
send_batch_size: 10240
Expand Down Expand Up @@ -97,6 +98,7 @@ data:
extensions:
- health_check
- file_storage
- pprof
pipelines:
logs/containers:
exporters:
Expand Down
4 changes: 4 additions & 0 deletions tests/helm/logs_otc_daemonset/static/basic.output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ spec:
fieldPath: metadata.namespace
securityContext:
{}
ports:
- name: pprof
containerPort: 1777
protocol: TCP
initContainers: # ensure the host path is owned by the otel user group
- name: changeowner
image: busybox
Expand Down
2 changes: 2 additions & 0 deletions tests/helm/metadata_logs_otc/static/basic.output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ data:
directory: /var/lib/storage/otc
timeout: 10s
health_check: {}
pprof: {}
processors:
attributes/containers:
actions:
Expand Down Expand Up @@ -227,6 +228,7 @@ data:
extensions:
- health_check
- file_storage
- pprof
pipelines:
logs/fluent/containers:
exporters:
Expand Down
2 changes: 2 additions & 0 deletions tests/helm/metadata_logs_otc/static/templates.output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ data:
directory: /var/lib/storage/otc
timeout: 10s
health_check: {}
pprof: {}
processors:
attributes/containers:
actions:
Expand Down Expand Up @@ -227,6 +228,7 @@ data:
extensions:
- health_check
- file_storage
- pprof
pipelines:
logs/fluent/containers:
exporters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ spec:
- name: otlphttp
containerPort: 4318
protocol: TCP
- name: pprof
containerPort: 1777
protocol: TCP
livenessProbe:
httpGet:
path: /
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ spec:
- name: metrics
containerPort: 8888
protocol: TCP
- name: pprof
containerPort: 1777
protocol: TCP
livenessProbe:
httpGet:
path: /
Expand Down

0 comments on commit 9bf45ca

Please sign in to comment.