Dynatrace OneAgent SDK for C/C++  1.7.1.1
onesdk_agent.h
Go to the documentation of this file.
1 /*
2  Copyright 2017-2019 Dynatrace LLC
3 
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7 
8  http://www.apache.org/licenses/LICENSE-2.0
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 */
16 
17 #ifndef ONESDK_AGENT_H_INCLUDED
18 #define ONESDK_AGENT_H_INCLUDED
19 
24 /*========================================================================================================================================*/
25 
26 #include "onesdk/onesdk_common.h" /* IWYU pragma: export */
27 #include "onesdk/onesdk_string.h"
28 
29 /*========================================================================================================================================*/
30 
35 /*========================================================================================================================================*/
36 
49 ONESDK_DECLARE_FUNCTION(onesdk_xchar_t const*) onesdk_agent_get_version_string(void);
50 
51 /*========================================================================================================================================*/
52 
59 ONESDK_DECLARE_FUNCTION(onesdk_int32_t) onesdk_agent_get_current_state(void);
60 
67 ONESDK_DECLARE_FUNCTION(void) onesdk_agent_set_logging_callback(onesdk_agent_logging_callback_t* agent_logging_callback);
68 
91 ONESDK_DECLARE_FUNCTION(onesdk_result_t) onesdk_agent_set_warning_callback(onesdk_agent_logging_callback_t* agent_logging_callback);
92 
106 ONESDK_DECLARE_FUNCTION(onesdk_result_t) onesdk_agent_set_verbose_callback(onesdk_agent_logging_callback_t* agent_logging_callback);
107 
108 
109 
118 ONESDK_DECLARE_FUNCTION(onesdk_int32_t) onesdk_agent_get_fork_state(void);
119 
120 /*========================================================================================================================================*/
121 
124 /*========================================================================================================================================*/
125 
148 /*========================================================================================================================================*/
149 
155 ONESDK_DECLARE_FUNCTION(void) onesdk_tracer_start(onesdk_tracer_handle_t tracer_handle);
156 
170 ONESDK_DECLARE_FUNCTION(void) onesdk_tracer_end(onesdk_tracer_handle_t tracer_handle);
171 
173 ONESDK_DECLARE_FUNCTION(void) onesdk_tracer_error_p(onesdk_tracer_handle_t tracer_handle, onesdk_string_t const* error_class, onesdk_string_t const* error_message);
174 
188 ONESDK_DEFINE_INLINE_FUNCTION(void) onesdk_tracer_error(onesdk_tracer_handle_t tracer_handle, onesdk_string_t error_class, onesdk_string_t error_message) {
189  onesdk_tracer_error_p(tracer_handle, &error_class, &error_message);
190 }
191 
192 /*========================================================================================================================================*/
193 
222 ONESDK_DECLARE_FUNCTION(onesdk_size_t) onesdk_tracer_get_outgoing_dynatrace_string_tag(onesdk_tracer_handle_t tracer_handle, char* buffer, onesdk_size_t buffer_size, onesdk_size_t* required_buffer_size);
223 
246 ONESDK_DECLARE_FUNCTION(onesdk_size_t) onesdk_tracer_get_outgoing_dynatrace_byte_tag(onesdk_tracer_handle_t tracer_handle, unsigned char* buffer, onesdk_size_t buffer_size, onesdk_size_t* required_buffer_size);
247 
248 /*========================================================================================================================================*/
249 
251 ONESDK_DECLARE_FUNCTION(void) onesdk_tracer_set_incoming_dynatrace_string_tag_p(onesdk_tracer_handle_t tracer_handle, onesdk_string_t const* string_tag);
252 
268 ONESDK_DEFINE_INLINE_FUNCTION(void) onesdk_tracer_set_incoming_dynatrace_string_tag(onesdk_tracer_handle_t tracer_handle, onesdk_string_t string_tag) {
269  onesdk_tracer_set_incoming_dynatrace_string_tag_p(tracer_handle, &string_tag);
270 }
271 
287 ONESDK_DECLARE_FUNCTION(void) onesdk_tracer_set_incoming_dynatrace_byte_tag(onesdk_tracer_handle_t tracer_handle, unsigned char const* byte_tag, onesdk_size_t byte_tag_size);
288 
289 /*========================================================================================================================================*/
290 
293 /*========================================================================================================================================*/
294 
307 /*========================================================================================================================================*/
308 
310 ONESDK_DECLARE_FUNCTION(void) onesdk_customrequestattribute_add_integers_p(onesdk_string_t const* keys, onesdk_int64_t const* values, onesdk_size_t count);
311 
320 ONESDK_DEFINE_INLINE_FUNCTION(void) onesdk_customrequestattribute_add_integer(onesdk_string_t key, onesdk_int64_t value) {
321  onesdk_customrequestattribute_add_integers_p(&key, &value, 1);
322 }
323 
325 ONESDK_DECLARE_FUNCTION(void) onesdk_customrequestattribute_add_floats_p(onesdk_string_t const* keys, double const* values, onesdk_size_t count);
326 
335 ONESDK_DEFINE_INLINE_FUNCTION(void) onesdk_customrequestattribute_add_float(onesdk_string_t key, double value) {
336  onesdk_customrequestattribute_add_floats_p(&key, &value, 1);
337 }
338 
340 ONESDK_DECLARE_FUNCTION(void) onesdk_customrequestattribute_add_strings_p(onesdk_string_t const* keys, onesdk_string_t const* values, onesdk_size_t count);
341 
350 ONESDK_DEFINE_INLINE_FUNCTION(void) onesdk_customrequestattribute_add_string(onesdk_string_t key, onesdk_string_t value) {
351  onesdk_customrequestattribute_add_strings_p(&key, &value, 1);
352 }
353 
354 /*========================================================================================================================================*/
355 
358 /*========================================================================================================================================*/
359 
374 /*========================================================================================================================================*/
375 
400 ONESDK_DECLARE_FUNCTION(onesdk_size_t) onesdk_inprocesslink_create(unsigned char* buffer, onesdk_size_t buffer_size, onesdk_size_t* required_buffer_size);
401 
415 ONESDK_DECLARE_FUNCTION(onesdk_tracer_handle_t) onesdk_inprocesslinktracer_create(unsigned char const* in_process_link, onesdk_size_t in_process_link_size);
416 
417 /*========================================================================================================================================*/
418 
421 /*========================================================================================================================================*/
422 
479 /*========================================================================================================================================*/
480 
482 ONESDK_DECLARE_FUNCTION(onesdk_tracer_handle_t) onesdk_outgoingremotecalltracer_create_p(onesdk_string_t const* service_method, onesdk_string_t const* service_name, onesdk_string_t const* service_endpoint, onesdk_int32_t channel_type, onesdk_string_t const* channel_endpoint);
483 
495 ONESDK_DEFINE_INLINE_FUNCTION(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) {
496  return onesdk_outgoingremotecalltracer_create_p(&service_method, &service_name, &service_endpoint, channel_type, &channel_endpoint);
497 }
498 
500 ONESDK_DECLARE_FUNCTION(void) onesdk_outgoingremotecalltracer_set_protocol_name_p(onesdk_tracer_handle_t tracer_handle, onesdk_string_t const* protocol_name);
501 
511 ONESDK_DEFINE_INLINE_FUNCTION(void) onesdk_outgoingremotecalltracer_set_protocol_name(onesdk_tracer_handle_t tracer_handle, onesdk_string_t protocol_name) {
512  onesdk_outgoingremotecalltracer_set_protocol_name_p(tracer_handle, &protocol_name);
513 }
514 
515 /*========================================================================================================================================*/
516 
518 ONESDK_DECLARE_FUNCTION(onesdk_tracer_handle_t) onesdk_incomingremotecalltracer_create_p(onesdk_string_t const* service_method, onesdk_string_t const* service_name, onesdk_string_t const* service_endpoint);
519 
529 ONESDK_DEFINE_INLINE_FUNCTION(onesdk_tracer_handle_t) onesdk_incomingremotecalltracer_create(onesdk_string_t service_method, onesdk_string_t service_name, onesdk_string_t service_endpoint) {
530  return onesdk_incomingremotecalltracer_create_p(&service_method, &service_name, &service_endpoint);
531 }
532 
534 ONESDK_DECLARE_FUNCTION(void) onesdk_incomingremotecalltracer_set_protocol_name_p(onesdk_tracer_handle_t tracer_handle, onesdk_string_t const* protocol_name);
535 
545 ONESDK_DEFINE_INLINE_FUNCTION(void) onesdk_incomingremotecalltracer_set_protocol_name(onesdk_tracer_handle_t tracer_handle, onesdk_string_t protocol_name) {
546  onesdk_incomingremotecalltracer_set_protocol_name_p(tracer_handle, &protocol_name);
547 }
548 
549 /*========================================================================================================================================*/
550 
553 /*========================================================================================================================================*/
554 
571 ONESDK_DECLARE_FUNCTION(onesdk_databaseinfo_handle_t) onesdk_databaseinfo_create_p(onesdk_string_t const* name, onesdk_string_t const* vendor, onesdk_int32_t channel_type, onesdk_string_t const* channel_endpoint);
572 
586 ONESDK_DEFINE_INLINE_FUNCTION(onesdk_databaseinfo_handle_t) onesdk_databaseinfo_create(onesdk_string_t name, onesdk_string_t vendor, onesdk_int32_t channel_type, onesdk_string_t channel_endpoint) {
587  return onesdk_databaseinfo_create_p(&name, &vendor, channel_type, &channel_endpoint);
588 }
589 
601 ONESDK_DECLARE_FUNCTION(void) onesdk_databaseinfo_delete(onesdk_databaseinfo_handle_t databaseinfo_handle);
602 
604 ONESDK_DECLARE_FUNCTION(onesdk_tracer_handle_t) onesdk_databaserequesttracer_create_sql_p(onesdk_databaseinfo_handle_t databaseinfo_handle, onesdk_string_t const* statement);
605 
615  return onesdk_databaserequesttracer_create_sql_p(databaseinfo_handle, &statement);
616 }
617 
624 ONESDK_DECLARE_FUNCTION(void) onesdk_databaserequesttracer_set_returned_row_count(onesdk_tracer_handle_t tracer_handle, onesdk_int32_t returned_row_count);
625 
632 ONESDK_DECLARE_FUNCTION(void) onesdk_databaserequesttracer_set_round_trip_count(onesdk_tracer_handle_t tracer_handle, onesdk_int32_t round_trip_count);
633 
634 /*========================================================================================================================================*/
635 
638 /*========================================================================================================================================*/
639 
657 ONESDK_DECLARE_FUNCTION(onesdk_webapplicationinfo_handle_t) onesdk_webapplicationinfo_create_p(onesdk_string_t const* web_server_name, onesdk_string_t const* application_id, onesdk_string_t const* context_root);
658 
678 ONESDK_DEFINE_INLINE_FUNCTION(onesdk_webapplicationinfo_handle_t) onesdk_webapplicationinfo_create(onesdk_string_t web_server_name, onesdk_string_t application_id, onesdk_string_t context_root) {
679  return onesdk_webapplicationinfo_create_p(&web_server_name, &application_id, &context_root);
680 }
681 
695 ONESDK_DECLARE_FUNCTION(void) onesdk_webapplicationinfo_delete(onesdk_webapplicationinfo_handle_t webapplicationinfo_handle);
696 
698 ONESDK_DECLARE_FUNCTION(onesdk_tracer_handle_t) onesdk_incomingwebrequesttracer_create_p(onesdk_webapplicationinfo_handle_t webapplicationinfo_handle, onesdk_string_t const* url, onesdk_string_t const* method);
699 
713  return onesdk_incomingwebrequesttracer_create_p(webapplicationinfo_handle, &url, &method);
714 }
715 
717 ONESDK_DECLARE_FUNCTION(void) onesdk_incomingwebrequesttracer_set_remote_address_p(onesdk_tracer_handle_t tracer_handle, onesdk_string_t const* remote_address);
718 
735 ONESDK_DEFINE_INLINE_FUNCTION(void) onesdk_incomingwebrequesttracer_set_remote_address(onesdk_tracer_handle_t tracer_handle, onesdk_string_t remote_address) {
736  onesdk_incomingwebrequesttracer_set_remote_address_p(tracer_handle, &remote_address);
737 }
738 
740 ONESDK_DECLARE_FUNCTION(void) onesdk_incomingwebrequesttracer_add_request_headers_p(onesdk_tracer_handle_t tracer_handle, onesdk_string_t const* names, onesdk_string_t const* values, onesdk_size_t count);
741 
757 ONESDK_DEFINE_INLINE_FUNCTION(void) onesdk_incomingwebrequesttracer_add_request_header(onesdk_tracer_handle_t tracer_handle, onesdk_string_t name, onesdk_string_t value) {
758  onesdk_incomingwebrequesttracer_add_request_headers_p(tracer_handle, &name, &value, 1);
759 }
760 
762 ONESDK_DECLARE_FUNCTION(void) onesdk_incomingwebrequesttracer_add_parameters_p(onesdk_tracer_handle_t tracer_handle, onesdk_string_t const* names, onesdk_string_t const* values, onesdk_size_t count);
763 
773 ONESDK_DEFINE_INLINE_FUNCTION(void) onesdk_incomingwebrequesttracer_add_parameter(onesdk_tracer_handle_t tracer_handle, onesdk_string_t name, onesdk_string_t value) {
774  onesdk_incomingwebrequesttracer_add_parameters_p(tracer_handle, &name, &value, 1);
775 }
776 
778 ONESDK_DECLARE_FUNCTION(void) onesdk_incomingwebrequesttracer_add_response_headers_p(onesdk_tracer_handle_t tracer_handle, onesdk_string_t const* names, onesdk_string_t const* values, onesdk_size_t count);
779 
793  onesdk_incomingwebrequesttracer_add_response_headers_p(tracer_handle, &name, &value, 1);
794 }
795 
805 ONESDK_DECLARE_FUNCTION(void) onesdk_incomingwebrequesttracer_set_status_code(onesdk_tracer_handle_t tracer_handle, onesdk_int32_t status_code);
806 
807 /*========================================================================================================================================*/
808 
811 /*========================================================================================================================================*/
812 
833 /*========================================================================================================================================*/
834 
836 ONESDK_DECLARE_FUNCTION(onesdk_tracer_handle_t) onesdk_outgoingwebrequesttracer_create_p(onesdk_string_t const* url, onesdk_string_t const* method);
837 
851  return onesdk_outgoingwebrequesttracer_create_p(&url, &method);
852 }
853 
855 ONESDK_DECLARE_FUNCTION(void) onesdk_outgoingwebrequesttracer_add_request_headers_p(onesdk_tracer_handle_t tracer_handle, onesdk_string_t const* names, onesdk_string_t const* values, onesdk_size_t count);
856 
872 ONESDK_DEFINE_INLINE_FUNCTION(void) onesdk_outgoingwebrequesttracer_add_request_header(onesdk_tracer_handle_t tracer_handle, onesdk_string_t name, onesdk_string_t value) {
873  onesdk_outgoingwebrequesttracer_add_request_headers_p(tracer_handle, &name, &value, 1);
874 }
875 
877 ONESDK_DECLARE_FUNCTION(void) onesdk_outgoingwebrequesttracer_add_response_headers_p(onesdk_tracer_handle_t tracer_handle, onesdk_string_t const* names, onesdk_string_t const* values, onesdk_size_t count);
878 
893  onesdk_outgoingwebrequesttracer_add_response_headers_p(tracer_handle, &name, &value, 1);
894 }
895 
905 ONESDK_DECLARE_FUNCTION(void) onesdk_outgoingwebrequesttracer_set_status_code(onesdk_tracer_handle_t tracer_handle, onesdk_int32_t status_code);
906 
907 /*========================================================================================================================================*/
908 
911 /*========================================================================================================================================*/
912 
928 ONESDK_DECLARE_FUNCTION(onesdk_tracer_handle_t) onesdk_customservicetracer_create_p(onesdk_string_t const* service_method, onesdk_string_t const* service_name);
929 
938 ONESDK_DEFINE_INLINE_FUNCTION(onesdk_tracer_handle_t) onesdk_customservicetracer_create(onesdk_string_t service_method, onesdk_string_t service_name) {
939  return onesdk_customservicetracer_create_p(&service_method, &service_name);
940 }
941 
942 /*========================================================================================================================================*/
943 
946 /*========================================================================================================================================*/
947 
975 ONESDK_DECLARE_FUNCTION(onesdk_messagingsysteminfo_handle_t) onesdk_messagingsysteminfo_create_p(
976  onesdk_string_t const* vendor_name, onesdk_string_t const* destination_name, onesdk_int32_t destination_type, onesdk_int32_t channel_type, onesdk_string_t const* channel_endpoint);
977 
995  onesdk_string_t vendor_name, onesdk_string_t destination_name, onesdk_int32_t destination_type, onesdk_int32_t channel_type, onesdk_string_t channel_endpoint
996 ) {
997  return onesdk_messagingsysteminfo_create_p(&vendor_name, &destination_name, destination_type, channel_type, &channel_endpoint);
998 }
999 
1013 ONESDK_DECLARE_FUNCTION(void) onesdk_messagingsysteminfo_delete(onesdk_messagingsysteminfo_handle_t messagingsysteminfo_handle);
1014 
1022 ONESDK_DECLARE_FUNCTION(onesdk_tracer_handle_t) onesdk_outgoingmessagetracer_create(onesdk_messagingsysteminfo_handle_t messagingsysteminfo_handle);
1023 
1025 ONESDK_DECLARE_FUNCTION(void) onesdk_outgoingmessagetracer_set_vendor_message_id_p(onesdk_tracer_handle_t tracer_handle, onesdk_string_t const* vendor_message_id);
1026 
1036 ONESDK_DEFINE_INLINE_FUNCTION(void) onesdk_outgoingmessagetracer_set_vendor_message_id(onesdk_tracer_handle_t tracer_handle, onesdk_string_t vendor_message_id) {
1037  onesdk_outgoingmessagetracer_set_vendor_message_id_p(tracer_handle, &vendor_message_id);
1038 }
1039 
1041 ONESDK_DECLARE_FUNCTION(void) onesdk_outgoingmessagetracer_set_correlation_id_p(onesdk_tracer_handle_t tracer_handle, onesdk_string_t const* correlation_id);
1042 
1052 ONESDK_DEFINE_INLINE_FUNCTION(void) onesdk_outgoingmessagetracer_set_correlation_id(onesdk_tracer_handle_t tracer_handle, onesdk_string_t correlation_id) {
1053  onesdk_outgoingmessagetracer_set_correlation_id_p(tracer_handle, &correlation_id);
1054 }
1055 
1069 
1084 
1086 ONESDK_DECLARE_FUNCTION(void) onesdk_incomingmessageprocesstracer_set_vendor_message_id_p(onesdk_tracer_handle_t tracer_handle, onesdk_string_t const* vendor_message_id);
1087 
1094 ONESDK_DEFINE_INLINE_FUNCTION(void) onesdk_incomingmessageprocesstracer_set_vendor_message_id(onesdk_tracer_handle_t tracer_handle, onesdk_string_t vendor_message_id) {
1095  onesdk_incomingmessageprocesstracer_set_vendor_message_id_p(tracer_handle, &vendor_message_id);
1096 }
1097 
1099 ONESDK_DECLARE_FUNCTION(void) onesdk_incomingmessageprocesstracer_set_correlation_id_p(onesdk_tracer_handle_t tracer_handle, onesdk_string_t const* correlation_id);
1100 
1107 ONESDK_DEFINE_INLINE_FUNCTION(void) onesdk_incomingmessageprocesstracer_set_correlation_id(onesdk_tracer_handle_t tracer_handle, onesdk_string_t correlation_id) {
1108  onesdk_incomingmessageprocesstracer_set_correlation_id_p(tracer_handle, &correlation_id);
1109 }
1110 
1111 /*========================================================================================================================================*/
1112 
1115 /*========================================================================================================================================*/
1116 
1156 ONESDK_DECLARE_FUNCTION(onesdk_result_t) onesdk_tracecontext_get_current(
1157  char* trace_id_buffer, onesdk_size_t trace_id_buffer_size, char* span_id_buffer, onesdk_size_t span_id_buffer_size);
1158 
1159 
1162 /*========================================================================================================================================*/
1163 
1164 #endif /* ONESDK_AGENT_H_INCLUDED */
onesdk_tracer_handle_t onesdk_outgoingwebrequesttracer_create(onesdk_string_t url, onesdk_string_t method)
Creates a tracer for tracing an outgoing web request.
Definition: onesdk_agent.h:850
void onesdk_tracer_end(onesdk_tracer_handle_t tracer_handle)
Ends and releases a tracer.
void onesdk_customrequestattribute_add_string(onesdk_string_t key, onesdk_string_t value)
Adds a custom request attribute string to the active tracer.
Definition: onesdk_agent.h:350
onesdk_handle_t onesdk_tracer_handle_t
A handle that refers to a tracer object.
Definition: onesdk_common.h:135
void onesdk_customrequestattribute_add_integer(onesdk_string_t key, onesdk_int64_t value)
Adds a custom request attribute integer to the active tracer.
Definition: onesdk_agent.h:320
void onesdk_tracer_set_incoming_dynatrace_string_tag(onesdk_tracer_handle_t tracer_handle, onesdk_string_t string_tag)
Sets the tag of an "incoming taggable" tracer using the string representation.
Definition: onesdk_agent.h:268
Defines common types/constants/macros. Applications should not include this file directly.
void onesdk_incomingmessageprocesstracer_set_correlation_id(onesdk_tracer_handle_t tracer_handle, onesdk_string_t correlation_id)
Sets the corrrelation ID of an incoming message.
Definition: onesdk_agent.h:1107
onesdk_xchar_t const * onesdk_agent_get_version_string(void)
Returns the version string of the loaded SDK agent module.
void onesdk_outgoingwebrequesttracer_set_status_code(onesdk_tracer_handle_t tracer_handle, onesdk_int32_t status_code)
Sets the HTTP status code for an outgoing web request.
int64_t onesdk_int64_t
Signed 64 bit integer.
Definition: onesdk_config.h:216
void onesdk_tracer_error(onesdk_tracer_handle_t tracer_handle, onesdk_string_t error_class, onesdk_string_t error_message)
Sets error information for a tracer.
Definition: onesdk_agent.h:188
onesdk_tracer_handle_t onesdk_customservicetracer_create(onesdk_string_t service_method, onesdk_string_t service_name)
Creates a tracer for tracing a custom service.
Definition: onesdk_agent.h:938
onesdk_handle_t onesdk_databaseinfo_handle_t
A handle that refers to a database info object.
Definition: onesdk_common.h:136
void onesdk_agent_set_logging_callback(onesdk_agent_logging_callback_t *agent_logging_callback)
DEPRECATED. Sets the agent warning callback function.
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.
Definition: onesdk_agent.h:495
void onesdk_tracer_set_incoming_dynatrace_byte_tag(onesdk_tracer_handle_t tracer_handle, unsigned char const *byte_tag, onesdk_size_t byte_tag_size)
Sets the tag of an "incoming taggable" tracer using the binary representation.
onesdk_databaseinfo_handle_t onesdk_databaseinfo_create(onesdk_string_t name, onesdk_string_t vendor, onesdk_int32_t channel_type, onesdk_string_t channel_endpoint)
Creates a database info object.
Definition: onesdk_agent.h:586
onesdk_size_t onesdk_tracer_get_outgoing_dynatrace_string_tag(onesdk_tracer_handle_t tracer_handle, char *buffer, onesdk_size_t buffer_size, onesdk_size_t *required_buffer_size)
Retrieves the string representation of the tag from an "outgoing taggable" tracer.
void onesdk_webapplicationinfo_delete(onesdk_webapplicationinfo_handle_t webapplicationinfo_handle)
Releases a web application info object.
onesdk_tracer_handle_t onesdk_incomingwebrequesttracer_create(onesdk_webapplicationinfo_handle_t webapplicationinfo_handle, onesdk_string_t url, onesdk_string_t method)
Creates a tracer for tracing an incoming web request.
Definition: onesdk_agent.h:712
onesdk_result_t onesdk_tracecontext_get_current(char *trace_id_buffer, onesdk_size_t trace_id_buffer_size, char *span_id_buffer, onesdk_size_t span_id_buffer_size)
Retrieves the current W3C trace context's span and trace ID.
void onesdk_incomingwebrequesttracer_add_parameter(onesdk_tracer_handle_t tracer_handle, onesdk_string_t name, onesdk_string_t value)
Adds an HTTP POST parameter of an incoming web request.
Definition: onesdk_agent.h:773
void onesdk_incomingwebrequesttracer_add_request_header(onesdk_tracer_handle_t tracer_handle, onesdk_string_t name, onesdk_string_t value)
Adds an HTTP request header of an incoming web request.
Definition: onesdk_agent.h:757
void onesdk_agent_logging_callback_t(char const *message)
Agent logging function prototype.
Definition: onesdk_common.h:94
int32_t onesdk_result_t
Type for result codes of the SDK stub.
Definition: onesdk_config.h:181
void onesdk_databaserequesttracer_set_round_trip_count(onesdk_tracer_handle_t tracer_handle, onesdk_int32_t round_trip_count)
Sets the number of round trips for a database request.
void onesdk_databaserequesttracer_set_returned_row_count(onesdk_tracer_handle_t tracer_handle, onesdk_int32_t returned_row_count)
Sets the number of returned rows for a database request.
onesdk_tracer_handle_t onesdk_databaserequesttracer_create_sql(onesdk_databaseinfo_handle_t databaseinfo_handle, onesdk_string_t statement)
Creates a tracer for tracing SQL database requests.
Definition: onesdk_agent.h:614
Represents a reference to string data in a user specified encoding.
Definition: onesdk_string.h:59
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.
Definition: onesdk_agent.h:529
void onesdk_messagingsysteminfo_delete(onesdk_messagingsysteminfo_handle_t messagingsysteminfo_handle)
Releases a messaging system info object.
onesdk_tracer_handle_t onesdk_outgoingmessagetracer_create(onesdk_messagingsysteminfo_handle_t messagingsysteminfo_handle)
Creates a tracer for tracing an outgoing message.
void onesdk_outgoingwebrequesttracer_add_request_header(onesdk_tracer_handle_t tracer_handle, onesdk_string_t name, onesdk_string_t value)
Adds an HTTP request header of an outgoing web request.
Definition: onesdk_agent.h:872
void onesdk_incomingwebrequesttracer_set_status_code(onesdk_tracer_handle_t tracer_handle, onesdk_int32_t status_code)
Sets the HTTP status code for an incoming web request.
onesdk_int32_t onesdk_agent_get_fork_state(void)
Returns the current agent fork state. Only relevant if you used ONESDK_INIT_FLAG_FORKABLE. See Agent forking state constants.
onesdk_int32_t onesdk_agent_get_current_state(void)
Returns the current agent state.
void onesdk_customrequestattribute_add_float(onesdk_string_t key, double value)
Adds a custom request attribute floating point value to the active tracer.
Definition: onesdk_agent.h:335
char_or_wchar_t onesdk_xchar_t
The native character type of the operating system. wchar_t for Windows and char for other systems...
Definition: onesdk_config.h:228
onesdk_messagingsysteminfo_handle_t onesdk_messagingsysteminfo_create(onesdk_string_t vendor_name, onesdk_string_t destination_name, onesdk_int32_t destination_type, onesdk_int32_t channel_type, onesdk_string_t channel_endpoint)
Creates a messaging system info object.
Definition: onesdk_agent.h:994
onesdk_handle_t onesdk_webapplicationinfo_handle_t
A handle that refers to a web application info object.
Definition: onesdk_common.h:137
onesdk_result_t onesdk_agent_set_verbose_callback(onesdk_agent_logging_callback_t *agent_logging_callback)
Sets the verbose agent logging callback function.
void onesdk_incomingwebrequesttracer_set_remote_address(onesdk_tracer_handle_t tracer_handle, onesdk_string_t remote_address)
Sets the remote address of an incoming web request.
Definition: onesdk_agent.h:735
void onesdk_incomingmessageprocesstracer_set_vendor_message_id(onesdk_tracer_handle_t tracer_handle, onesdk_string_t vendor_message_id)
Sets the vendor message ID of an incoming message.
Definition: onesdk_agent.h:1094
void onesdk_incomingremotecalltracer_set_protocol_name(onesdk_tracer_handle_t tracer_handle, onesdk_string_t protocol_name)
Sets the name of the remoting protocol.
Definition: onesdk_agent.h:545
onesdk_tracer_handle_t onesdk_incomingmessagereceivetracer_create(onesdk_messagingsysteminfo_handle_t messagingsysteminfo_handle)
Creates a tracer for tracing the receipt of an incoming message.
void onesdk_tracer_start(onesdk_tracer_handle_t tracer_handle)
Starts a tracer.
int32_t onesdk_int32_t
Signed 32 bit integer.
Definition: onesdk_config.h:215
onesdk_handle_t onesdk_messagingsysteminfo_handle_t
A handle that refers to a messaging system info object.
Definition: onesdk_common.h:138
size_t onesdk_size_t
Unsigned integer type used for sizes (e.g. array sizes) and counts.
Definition: onesdk_config.h:220
onesdk_result_t onesdk_agent_set_warning_callback(onesdk_agent_logging_callback_t *agent_logging_callback)
Sets the agent warning callback function.
void onesdk_outgoingmessagetracer_set_correlation_id(onesdk_tracer_handle_t tracer_handle, onesdk_string_t correlation_id)
Sets the corrrelation ID of an outgoing message.
Definition: onesdk_agent.h:1052
void onesdk_outgoingmessagetracer_set_vendor_message_id(onesdk_tracer_handle_t tracer_handle, onesdk_string_t vendor_message_id)
Sets the vendor message ID of an outgoing message.
Definition: onesdk_agent.h:1036
void onesdk_databaseinfo_delete(onesdk_databaseinfo_handle_t databaseinfo_handle)
Releases a database info object.
onesdk_size_t onesdk_tracer_get_outgoing_dynatrace_byte_tag(onesdk_tracer_handle_t tracer_handle, unsigned char *buffer, onesdk_size_t buffer_size, onesdk_size_t *required_buffer_size)
Retrieves the binary representation of the tag from an "outgoing taggable" tracer.
void onesdk_outgoingwebrequesttracer_add_response_header(onesdk_tracer_handle_t tracer_handle, onesdk_string_t name, onesdk_string_t value)
Adds an HTTP response header for an outgoing web request.
Definition: onesdk_agent.h:892
onesdk_webapplicationinfo_handle_t onesdk_webapplicationinfo_create(onesdk_string_t web_server_name, onesdk_string_t application_id, onesdk_string_t context_root)
Creates a web application info object.
Definition: onesdk_agent.h:678
Defines onesdk_string_t, the string type used for tracing, plus related utility functions.
void onesdk_incomingwebrequesttracer_add_response_header(onesdk_tracer_handle_t tracer_handle, onesdk_string_t name, onesdk_string_t value)
Adds an HTTP response header for an incoming web request.
Definition: onesdk_agent.h:792
onesdk_tracer_handle_t onesdk_incomingmessageprocesstracer_create(onesdk_messagingsysteminfo_handle_t messagingsysteminfo_handle)
Creates a tracer for tracing the processing of an incoming message.
void onesdk_outgoingremotecalltracer_set_protocol_name(onesdk_tracer_handle_t tracer_handle, onesdk_string_t protocol_name)
Sets the name of the remoting protocol.
Definition: onesdk_agent.h:511