-
Notifications
You must be signed in to change notification settings - Fork 463
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(otlp,sdk): add schema_url to tracer. (#743)
* feat(otlp,sdk): add schema_url to tracer. * feat(sdk, dynatrace, prometheus, api, datadog, zipkin, proto): add schema_url to InstrumentationLibrary. * fix: address comments.
- Loading branch information
Showing
25 changed files
with
122 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,8 +14,13 @@ pub struct GlobalMeterProvider { | |
} | ||
|
||
impl MeterProvider for GlobalMeterProvider { | ||
fn meter(&self, name: &'static str, version: Option<&'static str>) -> Meter { | ||
self.provider.meter(name, version) | ||
fn meter( | ||
&self, | ||
name: &'static str, | ||
version: Option<&'static str>, | ||
schema_url: Option<&'static str>, | ||
) -> Meter { | ||
self.provider.meter(name, version, schema_url) | ||
} | ||
} | ||
|
||
|
@@ -58,10 +63,14 @@ pub fn meter_provider() -> GlobalMeterProvider { | |
/// | ||
/// This is a more convenient way of expressing `global::meter_provider().meter(name)`. | ||
pub fn meter(name: &'static str) -> Meter { | ||
meter_provider().meter(name, None) | ||
meter_provider().meter(name, None, None) | ||
} | ||
|
||
/// Creates a [`Meter`] with the name and version. | ||
pub fn meter_with_version(name: &'static str, version: &'static str) -> Meter { | ||
meter_provider().meter(name, Some(version)) | ||
pub fn meter_with_version( | ||
name: &'static str, | ||
version: &'static str, | ||
schema_url: &'static str, | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jtescher
Member
|
||
) -> Meter { | ||
meter_provider().meter(name, Some(version), Some(schema_url)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
So I'm not sure this make sense to add here, I know it's a bit late, but shouldn't the schema url be defaulted to none?