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

Add an OTLP receiver to Weaver to prepare for the weaver registry live-check command #548

Open
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

lquerel
Copy link
Contributor

@lquerel lquerel commented Jan 11, 2025

This PR aims to facilitate the creation of commands such as validating the compliance of an OTLP stream against a semconv registry or generating a semconv registry from an OTLP stream.

Weaver is already used in the context of a CI/CD pipeline, this is simply about extending the possibilities for validation or semconv registry generation in a more live context.

An otlp-receiver can now easily be launched within Weaver to implement these commands or any other commands that make sense in this context. A skeleton of the command weaver registry live-check is provided to help future contribution.

Notes:

  • I vendored the gRPC stubs to avoid a dependency on protoc in our CI/CD pipeline. There is a comment in the build.rs explaining to regenerate the vendored gRPC stubs. Most of the files presents in this PR are either proto files or code generated from those proto files.
  • Both client and server gRPC stubs are generated. The client stubs are used for test purposes and the server stubs are used to implement the OTLP listener.

Next Step:
Someone will implement the weaver registry live-check command. A great example of this approach was demonstrated by @jerbly during the Semantic Convention Tooling SIG on January 15, 2025.

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

clippy found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

src/otlp_receiver/check.rs Fixed Show fixed Hide fixed
src/otlp_receiver/check.rs Fixed Show fixed Hide fixed
src/otlp_receiver/check.rs Fixed Show fixed Hide fixed
src/otlp_receiver/check.rs Fixed Show fixed Hide fixed
src/otlp_receiver/check.rs Fixed Show fixed Hide fixed
src/otlp_receiver/mod.rs Fixed Show fixed Hide fixed
src/otlp_receiver/mod.rs Fixed Show fixed Hide fixed
src/otlp_receiver/mod.rs Fixed Show fixed Hide fixed
src/otlp_receiver/mod.rs Fixed Show fixed Hide fixed
src/otlp_receiver/mod.rs Fixed Show fixed Hide fixed
@lquerel lquerel self-assigned this Jan 11, 2025
@lquerel lquerel added the enhancement New feature or request label Jan 11, 2025
@lquerel lquerel changed the title [WIP] Add otlp-receiver + skeleton for check-registry and infer-registry Add an OTLP receiver to Weaver to prepare for the weaver registry live-check command Jan 16, 2025
@lquerel lquerel marked this pull request as ready for review January 16, 2025 05:36
@lquerel lquerel requested a review from a team as a code owner January 16, 2025 05:36
src/registry/otlp/mod.rs Outdated Show resolved Hide resolved
src/registry/otlp/mod.rs Fixed Show fixed Hide fixed
Copy link

codecov bot commented Jan 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.6%. Comparing base (d616ff9) to head (f8ce975).

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #548   +/-   ##
=====================================
  Coverage   74.6%   74.6%           
=====================================
  Files         51      51           
  Lines       3965    3965           
=====================================
+ Hits        2958    2959    +1     
+ Misses      1007    1006    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lquerel lquerel requested review from jsuereth and lmolkova January 17, 2025 02:30
Copy link
Contributor

@jerbly jerbly left a comment

Choose a reason for hiding this comment

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

Amazing! This opens up a whole load of new use cases for weaver! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Next Release
Development

Successfully merging this pull request may close these issues.

2 participants