Skip to content

Commit

Permalink
feat: export SDK crate version as constant
Browse files Browse the repository at this point in the history
  • Loading branch information
the-wondersmith committed Jan 10, 2025
1 parent 6cc327d commit a1757fc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions opentelemetry-sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,7 @@ pub mod util;
pub use resource::Resource;

pub mod error;

/// The crate's version string, useful for populating [`Resource`] keys like
/// [`telemetry.sdk.version`](https://docs.rs/opentelemetry-semantic-conventions/latest/opentelemetry_semantic_conventions/attribute/constant.TELEMETRY_SDK_VERSION.html)
pub const VERSION: &str = env!("CARGO_PKG_VERSION");

0 comments on commit a1757fc

Please sign in to comment.