Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Micrometer instrumentation, part 3 #5017

Merged
merged 4 commits into from
Jan 12, 2022

Conversation

mateuszrzeszutek
Copy link
Member

@mateuszrzeszutek mateuszrzeszutek commented Jan 5, 2022

Continuation of #5001

This PR includes the last missing instruments: LongTaskTimer and Meter.

@mateuszrzeszutek mateuszrzeszutek changed the title Micrometer 3 Micrometer instrumentation, part 3 Jan 5, 2022
@mateuszrzeszutek mateuszrzeszutek marked this pull request as ready for review January 10, 2022 12:27
@mateuszrzeszutek mateuszrzeszutek requested review from a team, jack-berg and jsuereth January 10, 2022 12:27
Comment on lines +29 to +33
// we're always locking lock on the whole instrument map; the add/remove methods aren't called
// that often, so it's probably better to opt for correctness in that case - there is a small
// window between removing a single measurement and removing the whole instrument (if it has no
// more measurements) when potentially a new measurement could be added; a ConcurrentHashMap
// wouldn't be enough in this case
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx

@@ -38,5 +39,13 @@ static String baseUnit(Meter.Id id) {
return baseUnit == null ? "1" : baseUnit;
}

static String statisticInstrumentName(Meter.Id id, Statistic statistic) {
String prefix = id.getName() + ".";
// use "total_time" instead of "total" to avoid clashing with Statistic.TOTAL
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mateuszrzeszutek mateuszrzeszutek merged commit 8324b51 into open-telemetry:main Jan 12, 2022
@mateuszrzeszutek mateuszrzeszutek deleted the micrometer-3 branch January 12, 2022 15:26
RashmiRam pushed a commit to RashmiRam/opentelemetry-auto-instr-java that referenced this pull request May 23, 2022
* Micrometer instrumentation, part 3

* fix compilation

* add comment

* code review comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants