Skip to content

Commit

Permalink
add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateusz Rzeszutek committed Feb 8, 2022
1 parent 4d9e330 commit 265ce99
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions instrumentation/micrometer/micrometer-1.5/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Settings for the Micrometer bridge instrumentation

| System property | Type | Default | Description |
|---|---|---|---|
| `otel.instrumentation.micrometer.base-time-unit` | String | `ms` | Set the base time unit for the OpenTelemetry `MeterRegistry` implementation. <details><summary>Valid values</summary>`ns`, `nanoseconds`, `us`, `microseconds`, `ms`, `microseconds`, `s`, `seconds`, `min`, `minutes`, `h`, `hours`, `d`, `days`</details> |
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

package io.opentelemetry.instrumentation.micrometer.v1_5;

import java.util.Locale;
import java.util.concurrent.TimeUnit;
import javax.annotation.Nullable;
import org.slf4j.Logger;
Expand All @@ -18,7 +19,9 @@ static TimeUnit parseConfigValue(@Nullable String value) {
if (value == null) {
return TimeUnit.MILLISECONDS;
}
switch (value) {
// short names are UCUM names
// long names are just TimeUnit values lowercased
switch (value.toLowerCase(Locale.ROOT)) {
case "ns":
case "nanoseconds":
return TimeUnit.NANOSECONDS;
Expand Down

0 comments on commit 265ce99

Please sign in to comment.