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

Added support for OpenTelemetry process and system metrics #151826

Merged
merged 6 commits into from Mar 22, 2023

Conversation

AlexanderWert
Copy link
Member

Summary

Adds support for showing OpenTelemetry based system and JVM process metrics in APM's metrics view.

Resolves elastic/apm-data#12 in a cleaner way without the need to transform metrics.

Checklist

Delete any items that are not applicable to this PR.

  • Unit or functional tests were updated or added to match the most common scenarios
  • Any UI touched in this PR is usable by keyboard only (learn more about keyboard accessibility)
  • Any UI touched in this PR does not create any new axe failures (run axe in browser: FF, Chrome)
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This renders correctly on smaller devices using a responsive layout. (You can test this in your browser)
  • This was checked for cross-browser compatibility

@AlexanderWert AlexanderWert added the Team:APM All issues that need APM UI Team support label Feb 22, 2023
@AlexanderWert AlexanderWert requested a review from a team as a code owner February 22, 2023 08:35
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:APM)

@AlexanderWert
Copy link
Member Author

@felixbarny FYI, as you prosed in elastic/apm-data#12 (comment)

Comment on lines +67 to +79
const groupByField = isOpenTelemetry ? LABEL_GC : LABEL_NAME;

const targetField = isOpenTelemetry
? METRIC_OTEL_JVM_GC_DURATION
: rateOrTime === RATE
? METRIC_JAVA_GC_COUNT
: METRIC_JAVA_GC_TIME;

const fieldAggregation = isOpenTelemetry
? rateOrTime === RATE
? { value_count: { field: targetField } }
: { sum: { field: targetField } }
: { max: { field: targetField } };
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if fetchAndTransformGcMetrics should take groupByField, targetField and fieldAggregation as arguments instead of the conditionals here.

Copy link
Member

@sorenlouv sorenlouv Mar 2, 2023

Choose a reason for hiding this comment

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

Btw The fetchAndTransform * Metrics abstractions have annoyed me for years. Wondering if we'd be better off without them.

Conflicts:
	x-pack/plugins/apm/common/es_fields/__snapshots__/es_fields.test.ts.snap
	x-pack/plugins/apm/common/es_fields/apm.ts
	x-pack/plugins/apm/server/routes/metrics/get_service_nodes.ts
@AlexanderWert AlexanderWert enabled auto-merge (squash) March 22, 2023 10:20
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 433 436 +3

Total ESLint disabled count

id before after diff
securitySolution 513 516 +3

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@AlexanderWert AlexanderWert merged commit 84890fb into elastic:main Mar 22, 2023
17 checks passed
@kibanamachine kibanamachine added v8.8.0 backport:skip This commit does not require backporting labels Mar 22, 2023
nkhristinin pushed a commit that referenced this pull request Mar 22, 2023
## Summary

Adds support for showing OpenTelemetry based system and JVM process
metrics in APM's metrics view.

Resolves elastic/apm-data#12 in a cleaner way
without the need to transform metrics.
tsullivan pushed a commit to tsullivan/kibana that referenced this pull request Mar 22, 2023
…51826)

## Summary

Adds support for showing OpenTelemetry based system and JVM process
metrics in APM's metrics view.

Resolves elastic/apm-data#12 in a cleaner way
without the need to transform metrics.
@rcooper85
Copy link

Has this been released in version 8.8? As I can't see any mention of it in the release notes.

@mielastic
Copy link

I'm running 8.11.1 and OTel Java Agent 1.32.0 and in APM app, "System memory usage", "Garbage collection per minute" and "Garbage collection time spent per minute" are not showing any data. Is this still not fixed?

@idinak
Copy link

idinak commented Dec 26, 2023

When will it be released?

@valerioarvizzigno
Copy link

FYI, customers still reporting this issue on OTel Java agent 1.32.0 and Elastic 8.10.2. Any updates on incoming fixes?

@marcomusso
Copy link

Elastic 8.12.2 and OpenTelemetry Java agent 1.34.1 here and empty "System memory usage", "Garbage collection per minute" and "Garbage collection time spent per minute" panels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:fix Team:APM All issues that need APM UI Team support v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OpenTelemetry JVM metrics are not properly mapped