Dynatrace OneAgent SDK for C/C++  1.7.1.1
Functions
Remote Call Tracers

Trace calls to remote services (RMI, etc.). More...

Functions

onesdk_tracer_handle_t onesdk_outgoingremotecalltracer_create (onesdk_string_t service_method, onesdk_string_t service_name, onesdk_string_t service_endpoint, onesdk_int32_t channel_type, onesdk_string_t channel_endpoint)
 Creates a tracer for tracing outgoing remote calls. More...
 
void onesdk_outgoingremotecalltracer_set_protocol_name (onesdk_tracer_handle_t tracer_handle, onesdk_string_t protocol_name)
 Sets the name of the remoting protocol. More...
 
onesdk_tracer_handle_t onesdk_incomingremotecalltracer_create (onesdk_string_t service_method, onesdk_string_t service_name, onesdk_string_t service_endpoint)
 Creates a tracer for tracing incoming remote calls. More...
 
void onesdk_incomingremotecalltracer_set_protocol_name (onesdk_tracer_handle_t tracer_handle, onesdk_string_t protocol_name)
 Sets the name of the remoting protocol. More...
 

Detailed Description

Trace calls to remote services (RMI, etc.).

When tracing remote calls, we use the following parameters

And for outgoing remote calls also

service_method should be the name of the service method/operation, service_name the name of the service class/type and service_endpoint a string identifying the "instance" of that service class/type.

The channel_ parameters are described in Channel Types and Endpoints.

Further there is the optional protocol_name property that you can set to specify the used "wire protocol".

For further information, see the high level SDK documentation at https://github.com/Dynatrace/OneAgent-SDK/#remoting

Example 1:
  • You're tracing an outgoing remote call to some web service org.example.services.Repository.
  • There are multiple repositories (multiple instances of org.example.services.Repository), but the one that you're using (calling) is located at http://art-department.example.org:12345/services/assets/repo.
  • You're storing a new file using the operation storeFile.
  • You're using HTTP over TCP/IP on port 12345 to access the service.
In that case you'd use
Example 2:
  • You're tracing a call to a custom remote service called MasterControlProgram.
  • There is only one instance of that service, running distributed on all servers of your company.
  • You're sending a "derez file" request.
  • The MasterControlProgram is accessed by a some custom laser communication system.
Since there is only one instance of the service, which doesn't really have a name/location/endpoint assigned to it, you don't really have anything meaningful to use as service_name argument. You have to specify something though, since it's an required argument (and empty string doesn't count). One easy convention for such cases would be to simply always use the string instance. Another one would be to use the service name. Let's go with the first.
In that case you'd use

Function Documentation

◆ onesdk_incomingremotecalltracer_create()

onesdk_tracer_handle_t onesdk_incomingremotecalltracer_create ( onesdk_string_t  service_method,
onesdk_string_t  service_name,
onesdk_string_t  service_endpoint 
)
inline

Creates a tracer for tracing incoming remote calls.

Parameters
service_methodThe name of the service method.
service_nameThe name of the service.
service_endpointThe service endpoint.
Returns
A handle for the newly created incoming remote call tracer or ONESDK_INVALID_HANDLE.

For more information see Remote Call Tracers.

◆ onesdk_incomingremotecalltracer_set_protocol_name()

void onesdk_incomingremotecalltracer_set_protocol_name ( onesdk_tracer_handle_t  tracer_handle,
onesdk_string_t  protocol_name 
)
inline

Sets the name of the remoting protocol.

Parameters
tracer_handleA valid incoming remote call tracer handle.
protocol_name[optional] The name of the remoting protocol used to access the service.

For more information see Remote Call Tracers.

Note
Calling this function with protocol_name = onesdk_nullstr() will reset/clear any value that was set previously.
This function can not be used after the tracer was started.

◆ onesdk_outgoingremotecalltracer_create()

onesdk_tracer_handle_t onesdk_outgoingremotecalltracer_create ( onesdk_string_t  service_method,
onesdk_string_t  service_name,
onesdk_string_t  service_endpoint,
onesdk_int32_t  channel_type,
onesdk_string_t  channel_endpoint 
)
inline

Creates a tracer for tracing outgoing remote calls.

Parameters
service_methodThe name of the service method.
service_nameThe name of the service.
service_endpointThe service endpoint.
channel_typeThe type of the channel used to communicate with the service.
channel_endpoint[optional] The endpoint of the channel used to communicate with the service.
Returns
A handle for the newly created outgoing remote call tracer or ONESDK_INVALID_HANDLE.

For more information see Remote Call Tracers and Channel Types and Endpoints.

◆ onesdk_outgoingremotecalltracer_set_protocol_name()

void onesdk_outgoingremotecalltracer_set_protocol_name ( onesdk_tracer_handle_t  tracer_handle,
onesdk_string_t  protocol_name 
)
inline

Sets the name of the remoting protocol.

Parameters
tracer_handleA valid outgoing remote call tracer handle.
protocol_name[optional] The name of the remoting protocol used to access the service.

For more information see Remote Call Tracers.

Note
Calling this function with protocol_name = onesdk_nullstr() will reset/clear any value that was set previously.
This function can not be used after the tracer was started.