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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapts the open-telemetry example for using agents #506

Merged
merged 5 commits into from
Oct 25, 2023

Conversation

fedefernandez
Copy link
Contributor

Based on the Demo example from open-telemetry/opentelemetry-collector-contrib, this PR updates the example to show how to deploy the collector in Agent mode.

The agent collector deployment pattern consists of applications — instrumented with an OpenTelemetry SDK using OpenTelemetry protocol (OTLP) — or other collectors (using the OTLP exporter) that send telemetry signals to a collector instance running with the application or on the same host as the application (such as a sidecar or a daemonset).

Each client-side SDK or downstream collector is configured with a collector location:

otel-agent-sdk

Decentralized collector deployment concept
In the app, the SDK is configured to send OTLP data to a collector.
The collector is configured to send telemetry data to one or more backends.

Ref docs

The Animal.kt client uses the opentelemetry library for instrumentation and for sending telemetry data to the opentelemetry collector.

This example presents the typical flow of observability data where multiple OpenTelemetry Collectors can be deployed.

graph TD;
    ClientA-->Collector;
    ClientB-->Collector;
    Collector-->Jaeger;
    Collector-->Zipkin;
    Collector-->Prometheus;
  • Clients send data directly to the OpenTelemetry Collector
  • The OpenTelemetry Collector Collector then sends the data to the appropriate backend. In the example Jaeger, Zipkin, and Prometheus.

The example uses docker-compose. To run the demo, switch to the server/docker/opentelemetry folder and run:

docker compose up -d

Docker should expose the following backends:

Copy link
Contributor

@Montagon Montagon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job! 👏

Copy link
Contributor

@raulraja raulraja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @fedefernandez !

@fedefernandez fedefernandez merged commit 57afd49 into main Oct 25, 2023
5 checks passed
@fedefernandez fedefernandez deleted the feature/opentelemetry branch October 25, 2023 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants