Skip to content

Commit

Permalink
Merge branch 'main' into 4484_aspnetcoreMetrics
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyMothra authored Aug 24, 2023
2 parents d4776ba + e330e57 commit b2c5b82
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/OpenTelemetry/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Increased the character limit of the Meter instrument name from 63 to 255.
([#4774](https://github.com/open-telemetry/opentelemetry-dotnet/issues/4774))

## 1.6.0-rc.1

Released 2023-Aug-21
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public MeterProviderBuilderSdk(IServiceProvider serviceProvider)
// Customers: This is not guaranteed to work forever. We may change this
// mechanism in the future do this at your own risk.
public static Regex InstrumentNameRegex { get; set; } = new(
@"^[a-z][a-z0-9-._]{0,62}$", RegexOptions.IgnoreCase | RegexOptions.Compiled);
@"^[a-z][a-z0-9-._]{0,254}$", RegexOptions.IgnoreCase | RegexOptions.Compiled);

public List<InstrumentationRegistration> Instrumentation { get; } = new();

Expand Down
4 changes: 2 additions & 2 deletions test/OpenTelemetry.Tests/Metrics/MetricTestData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static IEnumerable<object[]> InvalidInstrumentNames
new object[] { "-first-char-not-alphabetic" },
new object[] { "1first-char-not-alphabetic" },
new object[] { "invalid+separator" },
new object[] { new string('m', 64) },
new object[] { new string('m', 256) },
new object[] { "a\xb5" }, // `\xb5` is the Micro character
};

Expand All @@ -37,7 +37,7 @@ public static IEnumerable<object[]> ValidInstrumentNames
new object[] { "my-2-instrument" },
new object[] { "my.metric" },
new object[] { "my_metric2" },
new object[] { new string('m', 63) },
new object[] { new string('m', 255) },
new object[] { "CaSe-InSeNsItIvE" },
};

Expand Down

0 comments on commit b2c5b82

Please sign in to comment.