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

feat: Added http timeslice metrics from otel #2924

Merged
merged 4 commits into from
Feb 10, 2025

Conversation

jsumners-nr
Copy link
Contributor

This PR resolved #2655.

Copy link

codecov bot commented Feb 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.38%. Comparing base (965c41b) to head (dd98584).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2924      +/-   ##
==========================================
- Coverage   97.42%   97.38%   -0.05%     
==========================================
  Files         316      316              
  Lines       48383    48406      +23     
==========================================
+ Hits        47139    47140       +1     
- Misses       1244     1266      +22     
Flag Coverage Δ
integration-tests-cjs-18.x 72.49% <80.76%> (-0.01%) ⬇️
integration-tests-cjs-20.x 72.50% <80.76%> (?)
integration-tests-cjs-22.x 72.72% <80.76%> (+<0.01%) ⬆️
integration-tests-esm-18.x 49.99% <80.76%> (?)
integration-tests-esm-20.x 49.99% <80.76%> (+0.01%) ⬆️
integration-tests-esm-22.x 50.05% <80.76%> (?)
unit-tests-18.x 89.22% <96.15%> (+<0.01%) ⬆️
unit-tests-20.x 89.22% <96.15%> (+<0.01%) ⬆️
unit-tests-22.x 89.23% <96.15%> (+<0.01%) ⬆️
versioned-tests-18.x 79.49% <100.00%> (-0.02%) ⬇️
versioned-tests-20.x 79.50% <100.00%> (-0.02%) ⬇️
versioned-tests-22.x 79.50% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

assert.equal(attrs['url.scheme'], 'http')
assert.equal(attrs.nr_exclusive_duration_millis, duration)

const unscopedMetrics = tx.metrics.unscoped
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not clear to me if there should be any scoped metrics. When I step through, there are not any.

Copy link
Member

Choose a reason for hiding this comment

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

yes there are a lot of metrics getting created, some aren't complete because it's not propagating context from upstream if it exists(which I will add in my ticket) but here are some that need asserted:

Apdex, Apdex/<partialName> which is currently null(I have fixed this), HttpDispatcher, WebTransactionTotalTime, WebTransactionTotalTime/(i have fixed in my PR)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Those are present in the unscoped metrics. I can add assertions for them. But I get zero metrics in tx.metrics.scoped.

Copy link
Member

Choose a reason for hiding this comment

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

ah sorry, yea there are no scoped metrics in this recorder. you can tell by looking at the recorder, the 2nd arg would be the scope and all are set to null

@jsumners-nr jsumners-nr marked this pull request as ready for review February 7, 2025 14:00
assert.equal(attrs['url.scheme'], 'http')
assert.equal(attrs.nr_exclusive_duration_millis, duration)

const unscopedMetrics = tx.metrics.unscoped
Copy link
Member

Choose a reason for hiding this comment

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

yes there are a lot of metrics getting created, some aren't complete because it's not propagating context from upstream if it exists(which I will add in my ticket) but here are some that need asserted:

Apdex, Apdex/<partialName> which is currently null(I have fixed this), HttpDispatcher, WebTransactionTotalTime, WebTransactionTotalTime/(i have fixed in my PR)

Copy link
Member

@bizob2828 bizob2828 left a comment

Choose a reason for hiding this comment

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

LGTM. i have work that's layering on top of this.

@bizob2828 bizob2828 merged commit f404585 into newrelic:main Feb 10, 2025
26 of 27 checks passed
@jsumners-nr jsumners-nr deleted the issue-2655 branch February 11, 2025 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done: Issues recently completed
Development

Successfully merging this pull request may close these issues.

Create webframework metrics for server otel spans
2 participants