-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from newrelic-experimental/useDT
Fixed Distributed tracing inconsistencies
- Loading branch information
Showing
77 changed files
with
1,206 additions
and
269 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
tibco_bw_bx_2_6/src/main/java/com/nr/instrumentation/bx/TibcoBXHeaders.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package com.nr.instrumentation.bx; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Collection; | ||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import com.newrelic.api.agent.HeaderType; | ||
import com.newrelic.api.agent.Headers; | ||
|
||
public class TibcoBXHeaders implements Headers { | ||
|
||
private Map<String, String> headers = new HashMap<>(); | ||
|
||
@Override | ||
public HeaderType getHeaderType() { | ||
return HeaderType.MESSAGE; | ||
} | ||
|
||
@Override | ||
public String getHeader(String name) { | ||
return headers.get(name); | ||
} | ||
|
||
@Override | ||
public Collection<String> getHeaders(String name) { | ||
List<String> list = new ArrayList<>(); | ||
String value = getHeader(name); | ||
if(value != null && !value.isEmpty()) { | ||
list.add(value); | ||
} | ||
return list ; | ||
} | ||
|
||
@Override | ||
public void setHeader(String name, String value) { | ||
headers.put(name, value); | ||
} | ||
|
||
@Override | ||
public void addHeader(String name, String value) { | ||
headers.put(name, value); | ||
} | ||
|
||
@Override | ||
public Collection<String> getHeaderNames() { | ||
return headers.keySet(); | ||
} | ||
|
||
@Override | ||
public boolean containsHeader(String name) { | ||
return getHeaderNames().contains(name); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
tibco_bw_bx_2_6/src/main/java/com/tibco/bx/api/services/BxInvocationInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package com.tibco.bx.api.services; | ||
|
||
import java.util.Map; | ||
|
||
import javax.security.auth.Subject; | ||
|
||
import com.newrelic.api.agent.weaver.NewField; | ||
import com.newrelic.api.agent.weaver.Weave; | ||
import com.nr.instrumentation.bx.TibcoBXHeaders; | ||
|
||
@Weave | ||
public abstract class BxInvocationInfo { | ||
|
||
@NewField | ||
public TibcoBXHeaders headers = new TibcoBXHeaders(); | ||
|
||
public abstract String getOperationName(); | ||
|
||
public abstract Map<String, Object> getInputContextVariables(); | ||
|
||
public abstract void setInputContextVariable(final String paramName, final Object value); | ||
|
||
public abstract String getAppName(); | ||
|
||
public abstract String getProcessName(); | ||
|
||
public abstract String getComponentModuleName(); | ||
|
||
public BxInvocationInfo() { | ||
} | ||
|
||
public BxInvocationInfo(String operationName, BxMessageType messageType) { | ||
} | ||
|
||
public BxInvocationInfo(String operationName, BxMessageType messageType, String appName, String appVersion, | ||
String componentModuleName, String componentModuleVersion) { | ||
} | ||
|
||
public BxInvocationInfo(String operationName, Subject subject, String correlationId, String contextId, | ||
String parentContextId, BxMessageType messageType) { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 6 additions & 15 deletions
21
tibco_bw_bx_2_6/src/main/java/com/tibco/bx/api/services/BxResponseListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.