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

Deprecate browser footer injection APIs;header injection now adds both scripts #1679

Merged
merged 4 commits into from
Jan 11, 2024

Conversation

jtduffy
Copy link
Contributor

@jtduffy jtduffy commented Jan 4, 2024

Overview

Resolves #1657

This change deprecates the browser footer API (getBrowserTimingFooter) and changes the behavior of the browser header API/instrumentation ('getBrowserTimingHeader) to now include both scripts in the ` element.

Calling the browser footer API returns an empty string.

Testing

The agent includes a suite of tests which should be used to
verify your changes don't break existing functionality. These tests will run with
Github Actions when a pull request is made. More details on running the tests locally can be found
here,

Checks

  • Your contributions are backwards compatible with relevant frameworks and APIs.
  • Your code does not contain any breaking changes. Otherwise please describe.
  • Your code does not introduce any new dependencies. Otherwise please describe.

@jtduffy jtduffy requested a review from a team January 4, 2024 15:50
@codecov-commenter
Copy link

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (2cbec36) 70.71% compared to head (52c9372) 70.70%.
Report is 18 commits behind head on main.

Files Patch % Lines
...java/com/newrelic/agent/browser/BrowserConfig.java 81.81% 1 Missing and 1 partial ⚠️
.../newrelic/api/agent/NewRelicApiImplementation.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1679      +/-   ##
============================================
- Coverage     70.71%   70.70%   -0.01%     
+ Complexity     9953     9935      -18     
============================================
  Files           828      828              
  Lines         39940    39877      -63     
  Branches       6032     6030       -2     
============================================
- Hits          28243    28195      -48     
+ Misses         8978     8962      -16     
- Partials       2719     2720       +1     

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

Copy link
Contributor

Choose a reason for hiding this comment

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

For the methods that are now noops, should we also update the Javadoc comments to call this out - and perhaps reference the header-only method that essentially replaces it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The javadoc in PublicApi.java contains the information regarding the deprecation/replacements of the footer related methods.

* * SPDX-License-Identifier: Apache-2.0
*
*/

package com.newrelic.agent.browser;
Copy link
Contributor

Choose a reason for hiding this comment

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

Copyright was lost.

@jtduffy jtduffy merged commit 0d98b3a into main Jan 11, 2024
103 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Browser agent updates
4 participants