Skip to content

Commit e7fb708

Browse files
authored
meter (#1274)
1 parent cf46a55 commit e7fb708

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

opentelemetry-sdk/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929

3030
- Remove context from Metric force_flush [#1245](https://github.com/open-telemetry/opentelemetry-rust/pull/1245)
3131

32+
### Fixed
33+
34+
- Fix metric instrument name validation to include `_` #1030
3235

3336
## v0.20.0
3437

opentelemetry-sdk/src/metrics/meter.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use crate::metrics::{
2525
const INSTRUMENT_NAME_MAX_LENGTH: usize = 255;
2626
// maximum length of instrument unit name
2727
const INSTRUMENT_UNIT_NAME_MAX_LENGTH: usize = 63;
28-
const INSTRUMENT_NAME_ALLOWED_NON_ALPHANUMERIC_CHARS: [char; 4] = ['-', '.', '-', '/'];
28+
const INSTRUMENT_NAME_ALLOWED_NON_ALPHANUMERIC_CHARS: [char; 4] = ['_', '.', '-', '/'];
2929

3030
// instrument validation error strings
3131
const INSTRUMENT_NAME_EMPTY: &str = "instrument name must be non-empty";

0 commit comments

Comments
 (0)