Skip to content

Conversation

@mssonicbld
Copy link
Collaborator

This PR introduces OpenTelemetry (OTEL) support for exporting SAI (Switch Abstraction Interface) statistics to observability systems. It implements conversion logic from SAI statistics to OTLP gauge metrics and adds an actor for exporting these metrics.

What I did

  • New OTEL message types for converting SAI statistics to OpenTelemetry gauge format
  • Initiated the integration of OpenTelemetry (OTEL) into the HFT components of sonic-swss
  • OtelActor implementation for receiving SAI stats and exporting to OTEL collectors
  • Command-line arguments for enabling and configuring OTEL export
  • Established configuration for exporting metrics and traces to OTEL collector

Why I did it

  • To improve observability and monitoring of HFT processes within SONiC SWSS.
  • OpenTelemetry provides standardized and extensible tracing which helps with debugging, performance analysis, and future integrations.

How I verified it

  • Ran unit and functional tests to confirm the existing behavior is preserved.
  • Verified that OTEL traces and metrics are being correctly populated and exported using a OTEL collector.
  • Checked integration with monitoring tools (such as Prometheus and InfluxDB) to ensure traces and metrics are visible.

Details if related

<!--
Please make sure you have read and understood the contribution guildlines:
https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md

1. Make sure your commit includes a signature generted with `git commit -s`
2. Make sure your commit title follows the correct format: [component]: description
3. Make sure your commit message contains enough details about the change and related tests
4. Make sure your pull request adds related reviewers, asignees, labels

Please also provide the following information in this pull request:
-->
This PR introduces OpenTelemetry (OTEL) support for exporting SAI (Switch Abstraction Interface) statistics to observability systems. It implements conversion logic from SAI statistics to OTLP gauge metrics and adds an actor for exporting these metrics.

**What I did**
- New OTEL message types for converting SAI statistics to OpenTelemetry gauge format
- Initiated the integration of OpenTelemetry (OTEL) into the HFT components of sonic-swss
- OtelActor implementation for receiving SAI stats and exporting to OTEL collectors
- Command-line arguments for enabling and configuring OTEL export
- Established configuration for exporting metrics and traces to OTEL collector

**Why I did it**
- To improve observability and monitoring of HFT processes within SONiC SWSS.
- OpenTelemetry provides standardized and extensible tracing which helps with debugging, performance analysis, and future integrations.

**How I verified it**
- Ran unit and functional tests to confirm the existing behavior is preserved.
- Verified that OTEL traces and metrics are being correctly populated and exported using a OTEL collector.
- Checked integration with monitoring tools (such as Prometheus and InfluxDB) to ensure traces and metrics are visible.

**Details if related**
@mssonicbld
Copy link
Collaborator Author

Original PR: #3920

@mssonicbld
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant