Skip to content

Commit

Permalink
Merge pull request #5 from newrelic-experimental/revert-3-useDT
Browse files Browse the repository at this point in the history
Revert "Use dt"
  • Loading branch information
dhilpipre authored Jul 24, 2023
2 parents 5890fd5 + 8d91d72 commit e4f3247
Show file tree
Hide file tree
Showing 25 changed files with 40 additions and 988 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ plugins {

project.ext {
group = 'com.newrelic.instrumentation'
javaAgentVersion = '6.4.0'
javaAgentVersion = '6.0.0'

// Aligned with minimum Java major version supported by latest Java Agent
javaVersion = JavaVersion.VERSION_1_8
Expand Down
26 changes: 0 additions & 26 deletions reactor-core-2.x/build.gradle

This file was deleted.

This file was deleted.

This file was deleted.

12 changes: 6 additions & 6 deletions reactor-core-3.1/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
apply plugin: 'java'

dependencies {
implementation 'io.projectreactor:reactor-core:3.1.0.RELEASE'
implementation 'io.projectreactor:reactor-core:3.2.11.RELEASE'

// New Relic Java Agent dependencies
implementation 'com.newrelic.agent.java:newrelic-agent:6.4.0'
Expand All @@ -19,13 +19,13 @@ dependencies {

jar {
manifest {
attributes 'Implementation-Title': 'com.newrelic.instrumentation.labs.reactor-core-3.1'
attributes 'Implementation-Vendor': 'New Relic Labs'
attributes 'Implementation-Vendor-Id': 'com.newrelic.labs'
attributes 'Implementation-Title': 'com.newrelic.instrumentation.reactor-core-3.1'
attributes 'Implementation-Vendor': 'New Relic'
attributes 'Implementation-Vendor-Id': 'com.newrelic'
attributes 'Implementation-Version': 1.0
}
}

verifyInstrumentation {
passes 'io.projectreactor:reactor-core:[3.1.0.RELEASE,3.3.0.RELEASE)'
}
passes 'io.projectreactor:reactor-core:[3.1.0.RELEASE,)'
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,38 +1,31 @@
package com.nr.instrumentation.reactor;

import com.newrelic.agent.bridge.AgentBridge;
import com.newrelic.api.agent.NewRelic;
import com.newrelic.api.agent.Token;
import com.newrelic.api.agent.Trace;
import com.newrelic.api.agent.TransportType;

public class NRRunnableWrapper implements Runnable {

private Runnable delegate = null;

private NRReactorHeaders headers;
private Token token = null;
private static boolean isTransformed = false;

public NRRunnableWrapper(Runnable r, NRReactorHeaders h) {
public NRRunnableWrapper(Runnable r, Token t) {
delegate = r;
headers = h;
token = t;
if(!isTransformed) {
isTransformed = true;
AgentBridge.instrumentation.retransformUninstrumentedClass(getClass());
}
}

@Override
@Trace(dispatcher=true)
@Trace(async=true)
public void run() {
boolean ignore = true;
if(headers != null) {
if(!headers.isEmpty()) {
NewRelic.getAgent().getTransaction().acceptDistributedTraceHeaders(TransportType.Other, headers);
ignore = false;
}
}
if(ignore) {
NewRelic.getAgent().getTransaction().ignore();
if(token != null) {
token.linkAndExpire();
token = null;
}
if(delegate != null) {
delegate.run();
Expand Down

This file was deleted.

Loading

0 comments on commit e4f3247

Please sign in to comment.