Skip to content

Commit

Permalink
feat: adds configurable request header instrumentation to network events
Browse files Browse the repository at this point in the history
The agent will now produce network event attributes for select header values if the headers are
detected on the request. The header names to instrument are
  • Loading branch information
ndesai-newrelic committed Dec 19, 2023
1 parent da255b2 commit 696ba4f
Show file tree
Hide file tree
Showing 16 changed files with 1,016 additions and 899 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.3.4

### New in this release
* Adds configurable request header instrumentation to network events
The agent will now produce network event attributes for select header values if the headers are detected on the request. The header names to instrument are passed into the agent when started.
* Updated the native Android agent to version 7.2.0.
* Updated the native iOS agent to version 7.4.8.

## 1.3.3

### New in this release
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ dependencies {
implementation("com.facebook.react:react-android")

implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")

implementation "com.salesforce.service:messaging-inapp-ui:1.4.0"
implementation 'com.salesforce.service:messaging-inapp-core:1.4.0'
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.squareup.okhttp3', module:'okhttp'
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ rootProject.name = 'AwesomeProject'
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle");
applyNativeModulesSettingsGradle(settings)
include ':app'
includeBuild('../node_modules/react-native-gradle-plugin')
includeBuild('../node_modules/@react-native/gradle-plugin')
3 changes: 2 additions & 1 deletion NewRelicExampleApp/React-Native-Test-App/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {Platform} from 'react-native';
let appToken;

if (Platform.OS === 'ios') {
appToken = 'placeholder';
appToken = 'AAa413614341452f701db5d23e4574ff22fd30bf8b-NRMA';
} else {
appToken = 'placeholder';
}
Expand Down Expand Up @@ -65,5 +65,6 @@ const agentConfiguration = {

NewRelic.startAgent(appToken, agentConfiguration);
NewRelic.setJSAppVersion(appVersion.version);
NewRelic.addHTTPHeadersTrackingFor(["Car","Music"]);

AppRegistry.registerComponent(appName, () => App);
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,7 @@
);
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = (
"$(OTHER_CFLAGS)",
"-DFOLLY_NO_CONFIG",
Expand Down Expand Up @@ -666,6 +667,7 @@
"\"$(inherited)\"",
);
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = (
"$(OTHER_CFLAGS)",
"-DFOLLY_NO_CONFIG",
Expand Down
Loading

0 comments on commit 696ba4f

Please sign in to comment.