• /
  • EnglishEspañol日本語한국어Português
  • Log inStart now

Cross application tracing (deprecated)

Important

For our Python agent, cross application tracing has been deprecated since agent version v7.0.0.166 and will be removed in a future agent release. A distributed tracing feature is now available. Distributed tracing improves on cross application tracing and is recommended for monitoring activity in complex distributed systems.

The protocol used to communicate between applications involves attaching metadata to requests and responses. The metadata is processed by each application and the resulting data is reported by the agent.

Requirements

Requires New Relic Python agent version 2.92.0.78 up to version 7.0.0.166. It's deprecated for versions above that.

Custom client (HTTP)

client_http_transport.png

These APIs are used for custom HTTP communication libraries that are not instrumented as part of the built in instrumentation.

HTTP cross application tracing uses HTTP headers to transport transaction metadata across applications. To generate outbound cross application tracing headers, use the generate_request_headers API on the ExternalTrace class. To process inbound cross application tracing headers, use the process_response_headers API on the ExternalTrace class.

Custom client (non-HTTP)

client_custom_transport.png

These APIs are used to instrument libraries that do not use the HTTP transport (and therefore may not be able to use headers as a metadata transport) and are not instrumented as part of the built in instrumentation.

Example Instrumentation

WSGI server

Tip

The agent will automatically handle processing and sending responses to cross application trace metadata for all WSGI servers.

For information on instrumenting WSGI servers, see the wsgi_application API documentation for details.

Custom non-HTTP server

server_nonhttp_transport.png

Custom servers that are not WSGI based or do not use HTTP as a transport will have to process incoming cross application tracing metadata and generate cross application trace responses.

The following APIs allow processing of cross application tracing metadata sent on non-HTTP requests and generating response metadata to send back to the caller.

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.