You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CARGO_PKG_REPOSITORY and CARGO_PKG_NAME are set by cargo to the current crate's values, not the top level project. This means that the values for repo_url and service_name, if not specified they will become https://github.com/autometrics-dev/autometrics-rs and autometrics respectively.
This problem does not exist for the labels from BuildInfoLabels since those are created in the expansion of the #[autometrics] macro, meaning the expanded env!() macros are located in the user's crate. A solution could be to expand these env!() macros along side the other BuildInfoLabels values.
A work around for now is to manually setup the autometrics settings using code like below:
In autometrics, the
repo_url
andservice_name
are both set from cargo environment variables.autometrics-rs/autometrics/src/settings.rs
Line 204 in 9bc24e0
autometrics-rs/autometrics/src/settings.rs
Line 215 in 9bc24e0
CARGO_PKG_REPOSITORY
andCARGO_PKG_NAME
are set by cargo to the current crate's values, not the top level project. This means that the values forrepo_url
andservice_name
, if not specified they will becomehttps://github.com/autometrics-dev/autometrics-rs
andautometrics
respectively.This problem does not exist for the labels from
BuildInfoLabels
since those are created in the expansion of the#[autometrics]
macro, meaning the expandedenv!()
macros are located in the user's crate. A solution could be to expand theseenv!()
macros along side the otherBuildInfoLabels
values.A work around for now is to manually setup the autometrics settings using code like below:
The text was updated successfully, but these errors were encountered: