Skip to content

Document OTLP Collector setup for telemetry.#3

Open
yutongzhang-microsoft wants to merge 4 commits intor12f:user/r12f/telfrom
yutongzhang-microsoft:yutongzhang/add_otlp_collector
Open

Document OTLP Collector setup for telemetry.#3
yutongzhang-microsoft wants to merge 4 commits intor12f:user/r12f/telfrom
yutongzhang-microsoft:yutongzhang/add_otlp_collector

Conversation

@yutongzhang-microsoft
Copy link

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911
  • 202012
  • 202205
  • 202305

Approach

What is the motivation for this PR?

How did you do it?

How did you verify/test it?

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

r12f and others added 3 commits October 4, 2025 22:00
Fix tests.

Update doc.

Minor update.

Fix TS reporters.

Fix TSRepoter.

Fix TS reporter.

minor fix.

Fix example.

Reverse relationship of metrics and reporter to support more types of metrics in future.

Remove bydesign not working test.

Fix example.

Update tests.

Update TS reporter and DB repoter.

Update minor things.

Remove no required code.

Revert unexpected change.

Rename and update doc.
Get os version and elastictest job id from correct place.
@mssonicbld
Copy link

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 3 in repo r12f/sonic-mgmt

3. [Examples](#examples)
7. [7. Data collection](#7-data-collection)
1. [7.1. Setup collection environment](#71-setup-collection-environment)
2. [7.2. Verify Data Collection](#72-setup-collection-environment)

Choose a reason for hiding this comment

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

link should be updated to 72-verify-data-collection


To start the collector:
```buildoutcfg
docker run -d --name <otlp-collector> -v /data/otel-config.yaml:/etc/otel/config.yaml -p 4317:4317 -p 4318:4318 otel/opentelemetry-collector:latest --config /etc/otel/config.yaml

Choose a reason for hiding this comment

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

It might be helpful to mention that /data/otel-config.yaml refers to a path on the local host, and users should replace it with the path to their own configuration file. This can help prevent any issues if someone copies the command directly and the file or directory doesn’t exist.

endpoint: 0.0.0.0:4318

exporters:
prometheusremotewrite:

Choose a reason for hiding this comment

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

It might be helpful to briefly explain what prometheusremotewrite does here, so readers understand that it’s an exporter that sends metrics from the OpenTelemetry Collector to a Prometheus-compatible remote storage endpoint. A short sentence or link to documentation could make this section clearer for readers who are not familiar with Prometheus Remote Write.

Choose a reason for hiding this comment

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

Sure, maybe I will add how Prometheus get data from otlp collector in this article later, and I will explain more detail.

@mssonicbld
Copy link

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 3 in repo r12f/sonic-mgmt

@mssonicbld
Copy link

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 3 in repo r12f/sonic-mgmt

@mssonicbld
Copy link

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 3 in repo r12f/sonic-mgmt

@mssonicbld
Copy link

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 3 in repo r12f/sonic-mgmt

@yutongzhang-microsoft yutongzhang-microsoft force-pushed the yutongzhang/add_otlp_collector branch from 97e18e0 to 76070e8 Compare November 5, 2025 03:00
@mssonicbld
Copy link

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 3 in repo r12f/sonic-mgmt

Copy link

@Janetxxx Janetxxx left a comment

Choose a reason for hiding this comment

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

Looks good to me

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.

4 participants