Skip to content
New issue

Have a question about this project?Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of serviceand privacy statement.We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] OTEL #18247

Closed
wants to merge 11 commits into from
Closed

[WIP] OTEL #18247

wants to merge 11 commits into from

Conversation

vkalintiris
Copy link
Collaborator

@vkalintiris vkalintiris commented Jul 31, 2024

Summary

Add support for ingesting OTLP metrics.

Building and running this agent will start the/usr/local/bin/otelcontribcolbinary (which you can install fromhttps://github /open-telemetry/opentelemetry-collector-contrib).

The current implementation handles all the receivers ofhostmetricsexcept forprocesses.

Test Plan
  • N/A. CI jobs are expected to fail at this point.
TODO
  • Productionize build system.
  • Rebase on master and use the newly added spawn functionality.
  • Handle resource_attributes and labels.
  • Investigate missing data on agent restart.
  • Cover corner-cases, eg:
    • malformed configuration yaml files
    • nested attributes
    • histogram metrics
  • Optimize CPU/RAM utilization.
  • Settle on placement of OTEL charts (currently they appear underSystem Overview)

@vkalintiris vkalintiris self-assigned this Jul 31, 2024
@github-actions github-actions bot added area/docs area/daemon area/streaming area/build Build system (autotools and cmake). labels Jul 31, 2024
@vkalintiris
Copy link
Collaborator Author

vkalintiris commented Jul 31, 2024

@ktsaou@ralphm

If you manage to build the PR and run the agent, you can use the something like the following configuration file to send OTEL data to the agent with the OpenTelemetry collector:

receivers:
hostmetrics:
collection_interval: 10s
scrapers:
cpu:
metrics:
system.cpu.frequency:
enabled: true
system.cpu.logical.count:
enabled: true
system.cpu.physical.count:
enabled: true
system.cpu.utilization:
enabled: true
disk:
filesystem:
metrics:
system.filesystem.utilization:
enabled: true
load:
memory:
metrics:
system.linux.memory.available:
enabled: true
system.memory.limit:
enabled: true
system.memory.utilization:
enabled: true
network:
metrics:
system.network.conntrack.count:
enabled: true
system.network.conntrack.max:
enabled: true
paging:
metrics:
system.paging.utilization:
enabled: true
processes:

exporters:
otlp:
endpoint: localhost:4317
tls:
insecure: true
file:
path: hostmetrics.log
rotation:

service:
telemetry:
metrics:
level: none
pipelines:
metrics:
receivers: [hostmetrics]
exporters: [otlp, file]

Running/usr/local/bin/otelcontribcol --config config.ymlwill send thehostmetricsdata to the agent.

Edit: To inspect the OTEL metrics that we send to the agent, you can run something likejq -C. hostmetrics.log |& less -RSNbecause the aforementioned configuration will emit the generated metrics to the local filesystem as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build Build system (autotools and cmake). area/docs area/packaging Packaging and operating systems support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant