[Gpr_To_Absl_Logging] Remove GRPC_API_TRACE (#37190)

[Gpr_To_Absl_Logging] Remove GRPC_API_TRACE .
This will be replaced by GRPC_TRACE_LOG

Closes #37190

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37190 from tanvi-jagtap:grpc_api_trace_fix 6dae72bc6e
PiperOrigin-RevId: 652397141
pull/37216/head
Tanvi Jagtap 7 months ago committed by Copybara-Service
parent 660101a2c9
commit ee5ccee552
  1. 25
      BUILD
  2. 1
      Package.swift
  3. 5
      build_autogenerated.yaml
  4. 2
      gRPC-C++.podspec
  5. 2
      gRPC-Core.podspec
  6. 1
      grpc.gemspec
  7. 1
      package.xml
  8. 11
      src/core/BUILD
  9. 8
      src/core/ext/filters/census/grpc_context.cc
  10. 1
      src/core/ext/transport/binder/client/channel_create_impl.cc
  11. 6
      src/core/ext/transport/chaotic_good/client/chaotic_good_connector.cc
  12. 12
      src/core/ext/transport/chttp2/client/chttp2_connector.cc
  13. 10
      src/core/ext/transport/chttp2/server/chttp2_server.cc
  14. 5
      src/core/ext/transport/inproc/legacy_inproc_transport.cc
  15. 6
      src/core/lib/compression/compression.cc
  16. 50
      src/core/lib/security/context/security_context.cc
  17. 16
      src/core/lib/security/credentials/composite/composite_credentials.cc
  18. 20
      src/core/lib/security/credentials/credentials.cc
  19. 5
      src/core/lib/security/credentials/google_default/google_default_credentials.cc
  20. 8
      src/core/lib/security/credentials/iam/iam_credentials.cc
  21. 1
      src/core/lib/security/credentials/jwt/jwt_credentials.cc
  22. 12
      src/core/lib/security/credentials/oauth2/oauth2_credentials.cc
  23. 6
      src/core/lib/security/credentials/plugin/plugin_credentials.cc
  24. 36
      src/core/lib/security/credentials/ssl/ssl_credentials.cc
  25. 5
      src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc
  26. 5
      src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.cc
  27. 7
      src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc
  28. 50
      src/core/lib/surface/api_trace.h
  29. 19
      src/core/lib/surface/call.cc
  30. 1
      src/core/lib/surface/call.h
  31. 7
      src/core/lib/surface/call_details.cc
  32. 66
      src/core/lib/surface/channel.cc
  33. 8
      src/core/lib/surface/channel_create.cc
  34. 67
      src/core/lib/surface/completion_queue.cc
  35. 3
      src/core/lib/surface/filter_stack_call.cc
  36. 9
      src/core/lib/surface/init.cc
  37. 1
      src/core/lib/surface/lame_client.cc
  38. 7
      src/core/lib/surface/metadata_array.cc
  39. 70
      src/core/server/server.cc
  40. 10
      src/core/server/xds_server_config_fetcher.cc
  41. 1
      test/cpp/end2end/thread_stress_test.cc
  42. 1
      tools/doxygen/Doxyfile.c++.internal
  43. 1
      tools/doxygen/Doxyfile.core.internal

25
BUILD

@ -579,7 +579,6 @@ grpc_cc_library(
],
visibility = ["@grpc:public"],
deps = [
"api_trace",
"channel_arg_names",
"channel_stack_builder",
"config",
@ -659,7 +658,6 @@ grpc_cc_library(
"@grpc:public",
],
deps = [
"api_trace",
"channel_arg_names",
"channel_stack_builder",
"config",
@ -1151,7 +1149,6 @@ grpc_cc_library(
],
tags = ["nofixdeps"],
deps = [
"api_trace",
"channel",
"channel_create",
"config",
@ -1329,7 +1326,6 @@ grpc_cc_library(
],
visibility = ["@grpc:public"],
deps = [
"api_trace",
"gpr",
"grpc_base",
"grpc_public_hdrs",
@ -1477,21 +1473,6 @@ grpc_cc_library(
],
)
grpc_cc_library(
name = "api_trace",
hdrs = [
"//src/core:lib/surface/api_trace.h",
],
external_deps = [
"absl/log:log",
],
language = "c++",
deps = [
"gpr",
"grpc_trace",
],
)
grpc_cc_library(
name = "byte_buffer",
srcs = [
@ -1763,7 +1744,6 @@ grpc_cc_library(
language = "c++",
visibility = ["@grpc:alt_grpc_base_legacy"],
deps = [
"api_trace",
"channel_arg_names",
"channelz",
"cpp_impl_of",
@ -1809,7 +1789,6 @@ grpc_cc_library(
language = "c++",
visibility = ["@grpc:alt_grpc_base_legacy"],
deps = [
"api_trace",
"channel",
"channelz",
"config",
@ -1905,7 +1884,6 @@ grpc_cc_library(
language = "c++",
visibility = ["@grpc:alt_grpc_base_legacy"],
deps = [
"api_trace",
"call_combiner",
"call_tracer",
"channel",
@ -2035,7 +2013,6 @@ grpc_cc_library(
public_hdrs = GRPC_PUBLIC_HDRS + GRPC_PUBLIC_EVENT_ENGINE_HDRS,
visibility = ["@grpc:alt_grpc_base_legacy"],
deps = [
"api_trace",
"call_combiner",
"call_tracer",
"channel",
@ -2299,7 +2276,6 @@ grpc_cc_library(
public_hdrs = GRPC_PUBLIC_HDRS,
visibility = ["@grpc:public"],
deps = [
"api_trace",
"channel_arg_names",
"channelz",
"config",
@ -4090,7 +4066,6 @@ grpc_cc_library(
language = "c++",
visibility = ["@grpc:public"],
deps = [
"api_trace",
"exec_ctx",
"gpr",
"grpc_base",

1
Package.swift generated

@ -1641,7 +1641,6 @@ let package = Package(
"src/core/lib/slice/slice_refcount.h",
"src/core/lib/slice/slice_string_helpers.cc",
"src/core/lib/slice/slice_string_helpers.h",
"src/core/lib/surface/api_trace.h",
"src/core/lib/surface/byte_buffer.cc",
"src/core/lib/surface/byte_buffer_reader.cc",
"src/core/lib/surface/call.cc",

@ -1075,7 +1075,6 @@ libs:
- src/core/lib/slice/slice_internal.h
- src/core/lib/slice/slice_refcount.h
- src/core/lib/slice/slice_string_helpers.h
- src/core/lib/surface/api_trace.h
- src/core/lib/surface/call.h
- src/core/lib/surface/call_test_only.h
- src/core/lib/surface/call_utils.h
@ -2597,7 +2596,6 @@ libs:
- src/core/lib/slice/slice_internal.h
- src/core/lib/slice/slice_refcount.h
- src/core/lib/slice/slice_string_helpers.h
- src/core/lib/surface/api_trace.h
- src/core/lib/surface/call.h
- src/core/lib/surface/call_test_only.h
- src/core/lib/surface/call_utils.h
@ -4690,7 +4688,6 @@ libs:
- src/core/lib/slice/slice_internal.h
- src/core/lib/slice/slice_refcount.h
- src/core/lib/slice/slice_string_helpers.h
- src/core/lib/surface/api_trace.h
- src/core/lib/surface/call.h
- src/core/lib/surface/call_test_only.h
- src/core/lib/surface/call_utils.h
@ -6646,7 +6643,6 @@ targets:
- src/core/lib/slice/slice_internal.h
- src/core/lib/slice/slice_refcount.h
- src/core/lib/slice/slice_string_helpers.h
- src/core/lib/surface/api_trace.h
- src/core/lib/surface/channel_stack_type.h
- src/core/lib/transport/call_filters.h
- src/core/lib/transport/call_final_info.h
@ -7131,7 +7127,6 @@ targets:
- src/core/lib/slice/slice_internal.h
- src/core/lib/slice/slice_refcount.h
- src/core/lib/slice/slice_string_helpers.h
- src/core/lib/surface/api_trace.h
- src/core/lib/surface/call.h
- src/core/lib/surface/call_test_only.h
- src/core/lib/surface/call_utils.h

2
gRPC-C++.podspec generated

@ -1178,7 +1178,6 @@ Pod::Spec.new do |s|
'src/core/lib/slice/slice_internal.h',
'src/core/lib/slice/slice_refcount.h',
'src/core/lib/slice/slice_string_helpers.h',
'src/core/lib/surface/api_trace.h',
'src/core/lib/surface/call.h',
'src/core/lib/surface/call_test_only.h',
'src/core/lib/surface/call_utils.h',
@ -2462,7 +2461,6 @@ Pod::Spec.new do |s|
'src/core/lib/slice/slice_internal.h',
'src/core/lib/slice/slice_refcount.h',
'src/core/lib/slice/slice_string_helpers.h',
'src/core/lib/surface/api_trace.h',
'src/core/lib/surface/call.h',
'src/core/lib/surface/call_test_only.h',
'src/core/lib/surface/call_utils.h',

2
gRPC-Core.podspec generated

@ -1757,7 +1757,6 @@ Pod::Spec.new do |s|
'src/core/lib/slice/slice_refcount.h',
'src/core/lib/slice/slice_string_helpers.cc',
'src/core/lib/slice/slice_string_helpers.h',
'src/core/lib/surface/api_trace.h',
'src/core/lib/surface/byte_buffer.cc',
'src/core/lib/surface/byte_buffer_reader.cc',
'src/core/lib/surface/call.cc',
@ -3243,7 +3242,6 @@ Pod::Spec.new do |s|
'src/core/lib/slice/slice_internal.h',
'src/core/lib/slice/slice_refcount.h',
'src/core/lib/slice/slice_string_helpers.h',
'src/core/lib/surface/api_trace.h',
'src/core/lib/surface/call.h',
'src/core/lib/surface/call_test_only.h',
'src/core/lib/surface/call_utils.h',

1
grpc.gemspec generated

@ -1643,7 +1643,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/slice/slice_refcount.h )
s.files += %w( src/core/lib/slice/slice_string_helpers.cc )
s.files += %w( src/core/lib/slice/slice_string_helpers.h )
s.files += %w( src/core/lib/surface/api_trace.h )
s.files += %w( src/core/lib/surface/byte_buffer.cc )
s.files += %w( src/core/lib/surface/byte_buffer_reader.cc )
s.files += %w( src/core/lib/surface/call.cc )

1
package.xml generated

@ -1625,7 +1625,6 @@
<file baseinstalldir="/" name="src/core/lib/slice/slice_refcount.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/slice/slice_string_helpers.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/slice/slice_string_helpers.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/api_trace.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/byte_buffer.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/byte_buffer_reader.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/call.cc" role="src" />

@ -4101,7 +4101,6 @@ grpc_cc_library(
"iomgr_fwd",
"unique_type_name",
"useful",
"//:api_trace",
"//:channel_arg_names",
"//:debug_location",
"//:exec_ctx",
@ -4160,7 +4159,6 @@ grpc_cc_library(
"unique_type_name",
"useful",
"//:alts_util",
"//:api_trace",
"//:channel_arg_names",
"//:exec_ctx",
"//:gpr",
@ -4237,7 +4235,6 @@ grpc_cc_library(
"status_helper",
"unique_type_name",
"useful",
"//:api_trace",
"//:channel_arg_names",
"//:debug_location",
"//:exec_ctx",
@ -4280,7 +4277,6 @@ grpc_cc_library(
"slice",
"unique_type_name",
"useful",
"//:api_trace",
"//:exec_ctx",
"//:gpr",
"//:grpc_base",
@ -4331,7 +4327,6 @@ grpc_cc_library(
"time",
"unique_type_name",
"useful",
"//:api_trace",
"//:gpr",
"//:grpc_base",
"//:grpc_core_credentials_header",
@ -5712,7 +5707,6 @@ grpc_cc_library(
"xds_http_filter",
"xds_listener",
"xds_route_config",
"//:api_trace",
"//:config",
"//:debug_location",
"//:exec_ctx",
@ -7306,7 +7300,6 @@ grpc_cc_library(
"tcp_connect_handshaker",
"time",
"unique_type_name",
"//:api_trace",
"//:channel",
"//:channel_arg_names",
"//:channel_create",
@ -7368,7 +7361,6 @@ grpc_cc_library(
"status_helper",
"time",
"unique_type_name",
"//:api_trace",
"//:channel_arg_names",
"//:channelz",
"//:chttp2_legacy_frame",
@ -7428,7 +7420,6 @@ grpc_cc_library(
"status_helper",
"time",
"try_seq",
"//:api_trace",
"//:channel",
"//:channel_arg_names",
"//:channel_create",
@ -8112,7 +8103,6 @@ grpc_cc_library(
"ref_counted_string",
"slice",
"useful",
"//:api_trace",
"//:gpr",
"//:grpc_public_hdrs",
"//:grpc_trace",
@ -8237,7 +8227,6 @@ grpc_cc_library(
"time",
"try_seq",
"wait_for_callback",
"//:api_trace",
"//:channel",
"//:channel_create",
"//:config",

@ -22,18 +22,18 @@
#include <grpc/grpc.h>
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/surface/call.h"
void grpc_census_call_set_context(grpc_call* call, census_context* context) {
GRPC_API_TRACE("grpc_census_call_set_context(call=%p, census_context=%p)", 2,
(call, context));
GRPC_TRACE_LOG(api, INFO) << "grpc_census_call_set_context(call=" << call
<< ", census_context=" << context << ")";
if (context != nullptr) {
grpc_call_get_arena(call)->SetContext<census_context>(context);
}
}
census_context* grpc_census_call_get_context(grpc_call* call) {
GRPC_API_TRACE("grpc_census_call_get_context(call=%p)", 1, (call));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_census_call_get_context(call=" << call << ")";
return grpc_call_get_arena(call)->GetContext<census_context>();
}

@ -28,7 +28,6 @@
#include "src/core/ext/transport/binder/wire_format/binder.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/channel_create.h"

@ -61,7 +61,6 @@
#include "src/core/lib/resource_quota/resource_quota.h"
#include "src/core/lib/slice/slice.h"
#include "src/core/lib/slice/slice_buffer.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/channel_create.h"
#include "src/core/lib/transport/error_utils.h"
@ -373,8 +372,9 @@ class ChaoticGoodChannelFactory final : public ClientChannelFactory {
grpc_channel* grpc_chaotic_good_channel_create(const char* target,
const grpc_channel_args* args) {
grpc_core::ExecCtx exec_ctx;
GRPC_API_TRACE("grpc_chaotic_good_channel_create(target=%s, args=%p)", 2,
(target, (void*)args));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_chaotic_good_channel_create(target=" << target
<< ", args=" << (void*)args << ")";
grpc_channel* channel = nullptr;
grpc_error_handle error;
// Create channel.

@ -65,7 +65,6 @@
#include "src/core/lib/security/credentials/credentials.h"
#include "src/core/lib/security/credentials/insecure/insecure_credentials.h"
#include "src/core/lib/security/security_connector/security_connector.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/channel_create.h"
#include "src/core/lib/surface/channel_stack_type.h"
@ -310,8 +309,9 @@ grpc_channel* grpc_channel_create(const char* target,
grpc_channel_credentials* creds,
const grpc_channel_args* c_args) {
grpc_core::ExecCtx exec_ctx;
GRPC_API_TRACE("grpc_secure_channel_create(target=%s, creds=%p, args=%p)", 3,
(target, (void*)creds, (void*)c_args));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_secure_channel_create(target=" << target
<< ", creds=" << (void*)creds << ", args=" << (void*)c_args << ")";
grpc_channel* channel = nullptr;
grpc_error_handle error;
if (creds != nullptr) {
@ -350,9 +350,9 @@ grpc_channel* grpc_channel_create_from_fd(const char* target, int fd,
grpc_channel_credentials* creds,
const grpc_channel_args* args) {
grpc_core::ExecCtx exec_ctx;
GRPC_API_TRACE(
"grpc_channel_create_from_fd(target=%p, fd=%d, creds=%p, args=%p)", 4,
(target, fd, creds, args));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_channel_create_from_fd(target=" << target << ", fd=" << fd
<< ", creds=" << creds << ", args=" << args << ")";
// For now, we only support insecure channel credentials.
if (creds == nullptr ||
creds->type() != grpc_core::InsecureCredentials::Type()) {

@ -84,7 +84,6 @@
#include "src/core/lib/security/credentials/credentials.h"
#include "src/core/lib/security/credentials/insecure/insecure_credentials.h"
#include "src/core/lib/security/security_connector/security_connector.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/transport/error_utils.h"
#include "src/core/lib/transport/transport.h"
#include "src/core/lib/uri/uri_parser.h"
@ -1078,8 +1077,8 @@ int grpc_server_add_http2_port(grpc_server* server, const char* addr,
int port_num = 0;
grpc_core::Server* core_server = grpc_core::Server::FromC(server);
grpc_core::ChannelArgs args = core_server->channel_args();
GRPC_API_TRACE("grpc_server_add_http2_port(server=%p, addr=%s, creds=%p)", 3,
(server, addr, creds));
GRPC_TRACE_LOG(api, INFO) << "grpc_server_add_http2_port(server=" << server
<< ", addr=" << addr << ", creds=" << creds << ")";
// Create security context.
if (creds == nullptr) {
err = GRPC_ERROR_CREATE(
@ -1174,8 +1173,9 @@ absl::Status grpc_server_add_passive_listener(
std::shared_ptr<grpc_core::experimental::PassiveListenerImpl>
passive_listener) {
grpc_core::ExecCtx exec_ctx;
GRPC_API_TRACE("grpc_server_add_passive_listener(server=%p, credentials=%p)",
2, (server, credentials));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_server_add_passive_listener(server=" << server
<< ", credentials=" << credentials << ")";
// Create security context.
if (credentials == nullptr) {
return absl::UnavailableError(

@ -59,7 +59,6 @@
#include "src/core/lib/resource_quota/arena.h"
#include "src/core/lib/slice/slice.h"
#include "src/core/lib/slice/slice_buffer.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/channel_create.h"
#include "src/core/lib/surface/channel_stack_type.h"
@ -1238,8 +1237,8 @@ void inproc_transports_create(grpc_core::Transport** server_transport,
grpc_channel* grpc_legacy_inproc_channel_create(grpc_server* server,
const grpc_channel_args* args,
void* /*reserved*/) {
GRPC_API_TRACE("grpc_inproc_channel_create(server=%p, args=%p)", 2,
(server, args));
GRPC_TRACE_LOG(api, INFO) << "grpc_inproc_channel_create(server=" << server
<< ", args=" << args << ")";
grpc_core::ExecCtx exec_ctx;

@ -29,7 +29,6 @@
#include "src/core/lib/compression/compression_internal.h"
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/util/useful.h"
int grpc_compression_algorithm_is_message(grpc_compression_algorithm) {
@ -54,8 +53,9 @@ int grpc_compression_algorithm_parse(grpc_slice name,
int grpc_compression_algorithm_name(grpc_compression_algorithm algorithm,
const char** name) {
GRPC_API_TRACE("grpc_compression_algorithm_name(algorithm=%d, name=%p)", 2,
((int)algorithm, name));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_compression_algorithm_name(algorithm=" << (int)algorithm
<< ", name=" << name << ")";
const char* result = grpc_core::CompressionAlgorithmAsString(algorithm);
if (result != nullptr) {
*name = result;

@ -37,7 +37,6 @@
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/resource_quota/arena.h"
#include "src/core/lib/security/credentials/credentials.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/surface/call.h"
// --- grpc_call ---
@ -46,8 +45,8 @@ grpc_call_error grpc_call_set_credentials(grpc_call* call,
grpc_call_credentials* creds) {
grpc_core::ExecCtx exec_ctx;
grpc_client_security_context* ctx = nullptr;
GRPC_API_TRACE("grpc_call_set_credentials(call=%p, creds=%p)", 2,
(call, creds));
GRPC_TRACE_LOG(api, INFO) << "grpc_call_set_credentials(call=" << call
<< ", creds=" << creds << ")";
if (!grpc_call_is_client(call)) {
LOG(ERROR) << "Method is client-side only.";
return GRPC_CALL_ERROR_NOT_ON_SERVER;
@ -68,7 +67,7 @@ grpc_call_error grpc_call_set_credentials(grpc_call* call,
grpc_auth_context* grpc_call_auth_context(grpc_call* call) {
auto* sec_ctx =
grpc_call_get_arena(call)->GetContext<grpc_core::SecurityContext>();
GRPC_API_TRACE("grpc_call_auth_context(call=%p)", 1, (call));
GRPC_TRACE_LOG(api, INFO) << "grpc_call_auth_context(call=" << call << ")";
if (sec_ctx == nullptr) return nullptr;
if (grpc_call_is_client(call)) {
auto* sc = grpc_core::DownCast<grpc_client_security_context*>(sec_ctx);
@ -92,7 +91,8 @@ grpc_auth_context* grpc_call_auth_context(grpc_call* call) {
}
void grpc_auth_context_release(grpc_auth_context* context) {
GRPC_API_TRACE("grpc_auth_context_release(context=%p)", 1, (context));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_auth_context_release(context=" << context << ")";
if (context == nullptr) return;
context->Unref(DEBUG_LOCATION, "grpc_auth_context_unref");
}
@ -142,8 +142,8 @@ static grpc_auth_property_iterator empty_iterator = {nullptr, 0, nullptr};
const char* grpc_auth_context_peer_identity_property_name(
const grpc_auth_context* ctx) {
GRPC_API_TRACE("grpc_auth_context_peer_identity_property_name(ctx=%p)", 1,
(ctx));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_auth_context_peer_identity_property_name(ctx=" << ctx << ")";
return ctx->peer_identity_property_name();
}
@ -152,9 +152,9 @@ int grpc_auth_context_set_peer_identity_property_name(grpc_auth_context* ctx,
grpc_auth_property_iterator it =
grpc_auth_context_find_properties_by_name(ctx, name);
const grpc_auth_property* prop = grpc_auth_property_iterator_next(&it);
GRPC_API_TRACE(
"grpc_auth_context_set_peer_identity_property_name(ctx=%p, name=%s)", 2,
(ctx, name));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_auth_context_set_peer_identity_property_name(ctx=" << ctx
<< ", name=" << name << ")";
if (prop == nullptr) {
LOG(ERROR) << "Property name " << (name != nullptr ? name : "NULL")
<< " not found in auth context.";
@ -165,14 +165,16 @@ int grpc_auth_context_set_peer_identity_property_name(grpc_auth_context* ctx,
}
int grpc_auth_context_peer_is_authenticated(const grpc_auth_context* ctx) {
GRPC_API_TRACE("grpc_auth_context_peer_is_authenticated(ctx=%p)", 1, (ctx));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_auth_context_peer_is_authenticated(ctx=" << ctx << ")";
return ctx->is_authenticated();
}
grpc_auth_property_iterator grpc_auth_context_property_iterator(
const grpc_auth_context* ctx) {
grpc_auth_property_iterator it = empty_iterator;
GRPC_API_TRACE("grpc_auth_context_property_iterator(ctx=%p)", 1, (ctx));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_auth_context_property_iterator(ctx=" << ctx << ")";
if (ctx == nullptr) return it;
it.ctx = ctx;
return it;
@ -180,7 +182,8 @@ grpc_auth_property_iterator grpc_auth_context_property_iterator(
const grpc_auth_property* grpc_auth_property_iterator_next(
grpc_auth_property_iterator* it) {
GRPC_API_TRACE("grpc_auth_property_iterator_next(it=%p)", 1, (it));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_auth_property_iterator_next(it=" << it << ")";
if (it == nullptr || it->ctx == nullptr) return nullptr;
while (it->index == it->ctx->properties().count) {
if (it->ctx->chained() == nullptr) return nullptr;
@ -206,8 +209,9 @@ const grpc_auth_property* grpc_auth_property_iterator_next(
grpc_auth_property_iterator grpc_auth_context_find_properties_by_name(
const grpc_auth_context* ctx, const char* name) {
grpc_auth_property_iterator it = empty_iterator;
GRPC_API_TRACE("grpc_auth_context_find_properties_by_name(ctx=%p, name=%s)",
2, (ctx, name));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_auth_context_find_properties_by_name(ctx=" << ctx
<< ", name=" << name << ")";
if (ctx == nullptr || name == nullptr) return empty_iterator;
it.ctx = ctx;
it.name = name;
@ -216,7 +220,8 @@ grpc_auth_property_iterator grpc_auth_context_find_properties_by_name(
grpc_auth_property_iterator grpc_auth_context_peer_identity(
const grpc_auth_context* ctx) {
GRPC_API_TRACE("grpc_auth_context_peer_identity(ctx=%p)", 1, (ctx));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_auth_context_peer_identity(ctx=" << ctx << ")";
if (ctx == nullptr) return empty_iterator;
return grpc_auth_context_find_properties_by_name(
ctx, ctx->peer_identity_property_name());
@ -246,12 +251,11 @@ void grpc_auth_context::add_property(const char* name, const char* value,
void grpc_auth_context_add_property(grpc_auth_context* ctx, const char* name,
const char* value, size_t value_length) {
GRPC_API_TRACE(
GRPC_TRACE_LOG(api, INFO) << absl::StrFormat(
"grpc_auth_context_add_property(ctx=%p, name=%s, value=%*.*s, "
"value_length=%lu)",
6,
(ctx, name, (int)value_length, (int)value_length, value,
(unsigned long)value_length));
ctx, name, (int)value_length, (int)value_length, value,
(unsigned long)value_length);
ctx->add_property(name, value, value_length);
}
@ -267,9 +271,9 @@ void grpc_auth_context::add_cstring_property(const char* name,
void grpc_auth_context_add_cstring_property(grpc_auth_context* ctx,
const char* name,
const char* value) {
GRPC_API_TRACE(
"grpc_auth_context_add_cstring_property(ctx=%p, name=%s, value=%s)", 3,
(ctx, name, value));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_auth_context_add_cstring_property(ctx=" << ctx
<< ", name=" << name << ", value=" << value << ")";
ctx->add_cstring_property(name, value);
}

@ -32,7 +32,6 @@
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/promise/try_seq.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/transport/metadata_batch.h"
//
@ -127,10 +126,9 @@ composite_call_credentials_create(
grpc_call_credentials* grpc_composite_call_credentials_create(
grpc_call_credentials* creds1, grpc_call_credentials* creds2,
void* reserved) {
GRPC_API_TRACE(
"grpc_composite_call_credentials_create(creds1=%p, creds2=%p, "
"reserved=%p)",
3, (creds1, creds2, reserved));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_composite_call_credentials_create(creds1=" << creds1
<< ", creds2=" << creds2 << ", reserved=" << reserved << ")";
CHECK_EQ(reserved, nullptr);
CHECK_NE(creds1, nullptr);
CHECK_NE(creds2, nullptr);
@ -163,10 +161,10 @@ grpc_channel_credentials* grpc_composite_channel_credentials_create(
void* reserved) {
CHECK(channel_creds != nullptr && call_creds != nullptr &&
reserved == nullptr);
GRPC_API_TRACE(
"grpc_composite_channel_credentials_create(channel_creds=%p, "
"call_creds=%p, reserved=%p)",
3, (channel_creds, call_creds, reserved));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_composite_channel_credentials_create(channel_creds="
<< channel_creds << ", call_creds=" << call_creds
<< ", reserved=" << reserved << ")";
return new grpc_composite_channel_credentials(channel_creds->Ref(),
call_creds->Ref());
}

@ -30,19 +30,20 @@
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/crash.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/util/useful.h"
// -- Common. --
void grpc_channel_credentials_release(grpc_channel_credentials* creds) {
GRPC_API_TRACE("grpc_channel_credentials_release(creds=%p)", 1, (creds));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_channel_credentials_release(creds=" << creds << ")";
grpc_core::ExecCtx exec_ctx;
if (creds) creds->Unref();
}
void grpc_call_credentials_release(grpc_call_credentials* creds) {
GRPC_API_TRACE("grpc_call_credentials_release(creds=%p)", 1, (creds));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_call_credentials_release(creds=" << creds << ")";
grpc_core::ExecCtx exec_ctx;
if (creds) creds->Unref();
}
@ -95,18 +96,19 @@ grpc_channel_credentials* grpc_channel_credentials_find_in_args(
}
void grpc_server_credentials_release(grpc_server_credentials* creds) {
GRPC_API_TRACE("grpc_server_credentials_release(creds=%p)", 1, (creds));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_server_credentials_release(creds=" << creds << ")";
grpc_core::ExecCtx exec_ctx;
if (creds) creds->Unref();
}
void grpc_server_credentials::set_auth_metadata_processor(
const grpc_auth_metadata_processor& processor) {
GRPC_API_TRACE(
"grpc_server_credentials_set_auth_metadata_processor("
"creds=%p, "
"processor=grpc_auth_metadata_processor { process: %p, state: %p })",
3, (this, (void*)(intptr_t)processor.process, processor.state));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_server_credentials_set_auth_metadata_processor(creds=" << this
<< ", processor=grpc_auth_metadata_processor { process: "
<< (void*)(intptr_t)processor.process << ", state: " << processor.state
<< " })";
DestroyProcessor();
processor_ = processor;
}

@ -63,7 +63,6 @@
#include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h"
#include "src/core/lib/slice/slice.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/transport/error_utils.h"
#include "src/core/lib/uri/uri_parser.h"
#include "src/core/load_balancing/grpclb/grpclb.h"
@ -385,8 +384,8 @@ grpc_channel_credentials* grpc_google_default_credentials_create(
grpc_error_handle error;
grpc_core::ExecCtx exec_ctx;
GRPC_API_TRACE("grpc_google_default_credentials_create(%p)", 1,
(call_credentials));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_google_default_credentials_create(" << call_credentials << ")";
if (call_creds == nullptr) {
call_creds = make_default_call_creds(&error);

@ -34,7 +34,6 @@
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/promise/promise.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/transport/metadata_batch.h"
grpc_core::ArenaPromise<absl::StatusOr<grpc_core::ClientMetadataHandle>>
@ -70,10 +69,9 @@ grpc_core::UniqueTypeName grpc_google_iam_credentials::Type() {
grpc_call_credentials* grpc_google_iam_credentials_create(
const char* token, const char* authority_selector, void* reserved) {
grpc_core::ExecCtx exec_ctx;
GRPC_API_TRACE(
"grpc_iam_credentials_create(token=%s, authority_selector=%s, "
"reserved=%p)",
3, (token, authority_selector, reserved));
GRPC_TRACE_LOG(api, INFO) << "grpc_iam_credentials_create(token=" << token
<< ", authority_selector=" << authority_selector
<< ", reserved=" << reserved << ")";
CHECK_EQ(reserved, nullptr);
CHECK_NE(token, nullptr);
CHECK_NE(authority_selector, nullptr);

@ -41,7 +41,6 @@
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/promise/promise.h"
#include "src/core/lib/security/credentials/call_creds_util.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/transport/metadata_batch.h"
#include "src/core/lib/uri/uri_parser.h"
#include "src/core/util/json/json.h"

@ -56,7 +56,6 @@
#include "src/core/lib/promise/poll.h"
#include "src/core/lib/promise/promise.h"
#include "src/core/lib/security/util/json_util.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/transport/error_utils.h"
#include "src/core/lib/transport/metadata_batch.h"
#include "src/core/lib/uri/uri_parser.h"
@ -423,8 +422,8 @@ class grpc_compute_engine_token_fetcher_credentials
grpc_call_credentials* grpc_google_compute_engine_credentials_create(
void* reserved) {
GRPC_API_TRACE("grpc_compute_engine_credentials_create(reserved=%p)", 1,
(reserved));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_compute_engine_credentials_create(reserved=" << reserved << ")";
CHECK_EQ(reserved, nullptr);
return grpc_core::MakeRefCounted<
grpc_compute_engine_token_fetcher_credentials>()
@ -743,10 +742,9 @@ std::string grpc_access_token_credentials::debug_string() {
grpc_call_credentials* grpc_access_token_credentials_create(
const char* access_token, void* reserved) {
GRPC_API_TRACE(
"grpc_access_token_credentials_create(access_token=<redacted>, "
"reserved=%p)",
1, (reserved));
GRPC_TRACE_LOG(api, INFO) << "grpc_access_token_credentials_create(access_"
"token=<redacted>, reserved="
<< reserved << ")";
CHECK_EQ(reserved, nullptr);
return grpc_core::MakeRefCounted<grpc_access_token_credentials>(access_token)
.release();

@ -35,7 +35,6 @@
#include "src/core/lib/promise/promise.h"
#include "src/core/lib/slice/slice.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/surface/validate_metadata.h"
#include "src/core/lib/transport/metadata_batch.h"
@ -200,8 +199,9 @@ grpc_plugin_credentials::grpc_plugin_credentials(
grpc_call_credentials* grpc_metadata_credentials_create_from_plugin(
grpc_metadata_credentials_plugin plugin,
grpc_security_level min_security_level, void* reserved) {
GRPC_API_TRACE("grpc_metadata_credentials_create_from_plugin(reserved=%p)", 1,
(reserved));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_metadata_credentials_create_from_plugin(reserved=" << reserved
<< ")";
CHECK_EQ(reserved, nullptr);
return new grpc_plugin_credentials(plugin, min_security_level);
}

@ -35,7 +35,6 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/security/security_connector/ssl_utils.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/tsi/ssl/session_cache/ssl_session_cache.h"
#include "src/core/tsi/ssl_transport_security.h"
#include "src/core/tsi/transport_security_interface.h"
@ -225,12 +224,11 @@ grpc_security_status grpc_ssl_credentials::InitializeClientHandshakerFactory(
grpc_channel_credentials* grpc_ssl_credentials_create(
const char* pem_root_certs, grpc_ssl_pem_key_cert_pair* pem_key_cert_pair,
const verify_peer_options* verify_options, void* reserved) {
GRPC_API_TRACE(
"grpc_ssl_credentials_create(pem_root_certs=%s, "
"pem_key_cert_pair=%p, "
"verify_options=%p, "
"reserved=%p)",
4, (pem_root_certs, pem_key_cert_pair, verify_options, reserved));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_ssl_credentials_create(pem_root_certs=" << pem_root_certs
<< ", pem_key_cert_pair=" << pem_key_cert_pair
<< ", verify_options=" << verify_options << ", reserved=" << reserved
<< ")";
CHECK_EQ(reserved, nullptr);
return new grpc_ssl_credentials(
@ -241,12 +239,11 @@ grpc_channel_credentials* grpc_ssl_credentials_create(
grpc_channel_credentials* grpc_ssl_credentials_create_ex(
const char* pem_root_certs, grpc_ssl_pem_key_cert_pair* pem_key_cert_pair,
const grpc_ssl_verify_peer_options* verify_options, void* reserved) {
GRPC_API_TRACE(
"grpc_ssl_credentials_create(pem_root_certs=%s, "
"pem_key_cert_pair=%p, "
"verify_options=%p, "
"reserved=%p)",
4, (pem_root_certs, pem_key_cert_pair, verify_options, reserved));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_ssl_credentials_create(pem_root_certs=" << pem_root_certs
<< ", pem_key_cert_pair=" << pem_key_cert_pair
<< ", verify_options=" << verify_options << ", reserved=" << reserved
<< ")";
CHECK_EQ(reserved, nullptr);
return new grpc_ssl_credentials(pem_root_certs, pem_key_cert_pair,
@ -425,13 +422,12 @@ grpc_server_credentials* grpc_ssl_server_credentials_create_ex(
size_t num_key_cert_pairs,
grpc_ssl_client_certificate_request_type client_certificate_request,
void* reserved) {
GRPC_API_TRACE(
"grpc_ssl_server_credentials_create_ex("
"pem_root_certs=%s, pem_key_cert_pairs=%p, num_key_cert_pairs=%lu, "
"client_certificate_request=%d, reserved=%p)",
5,
(pem_root_certs, pem_key_cert_pairs, (unsigned long)num_key_cert_pairs,
client_certificate_request, reserved));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_ssl_server_credentials_create_ex(pem_root_certs="
<< pem_root_certs << ", pem_key_cert_pairs=" << pem_key_cert_pairs
<< ", num_key_cert_pairs=" << (unsigned long)num_key_cert_pairs
<< ", client_certificate_request=" << client_certificate_request
<< ", reserved=" << reserved << ")";
CHECK_EQ(reserved, nullptr);
grpc_ssl_server_certificate_config* cert_config =

@ -40,7 +40,6 @@
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/slice/slice.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/surface/api_trace.h"
namespace grpc_core {
@ -406,8 +405,8 @@ grpc_tls_certificate_provider_file_watcher_create(
void grpc_tls_certificate_provider_release(
grpc_tls_certificate_provider* provider) {
GRPC_API_TRACE("grpc_tls_certificate_provider_release(provider=%p)", 1,
(provider));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_tls_certificate_provider_release(provider=" << provider << ")";
grpc_core::ExecCtx exec_ctx;
if (provider != nullptr) provider->Unref();
}

@ -33,7 +33,6 @@
#include "src/core/lib/gprpp/host_port.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/security/credentials/tls/tls_utils.h"
#include "src/core/lib/surface/api_trace.h"
namespace grpc_core {
@ -234,8 +233,8 @@ grpc_tls_certificate_verifier_host_name_create() {
void grpc_tls_certificate_verifier_release(
grpc_tls_certificate_verifier* verifier) {
GRPC_API_TRACE("grpc_tls_certificate_verifier_release(verifier=%p)", 1,
(verifier));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_tls_certificate_verifier_release(verifier=" << verifier << ")";
grpc_core::ExecCtx exec_ctx;
if (verifier != nullptr) verifier->Unref();
}

@ -29,7 +29,6 @@
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/debug_location.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/tsi/ssl_transport_security.h"
/// -- Wrapper APIs declared in grpc_security.h -- *
@ -122,9 +121,9 @@ void grpc_tls_credentials_options_set_tls_session_key_log_file_path(
if (!tsi_tls_session_key_logging_supported() || options == nullptr) {
return;
}
GRPC_API_TRACE(
"grpc_tls_credentials_options_set_tls_session_key_log_config(options=%p)",
1, (options));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_tls_credentials_options_set_tls_session_key_log_config(options="
<< options << ")";
// Tls session key logging is assumed to be enabled if the specified log
// file is non-empty.
if (path != nullptr) {

@ -1,50 +0,0 @@
//
//
// Copyright 2015 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
//
#ifndef GRPC_SRC_CORE_LIB_SURFACE_API_TRACE_H
#define GRPC_SRC_CORE_LIB_SURFACE_API_TRACE_H
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
#include "src/core/lib/debug/trace.h"
// Provide unwrapping macros because we're in C89 and variadic macros weren't
// introduced until C99...
#define GRPC_API_TRACE_UNWRAP0()
#define GRPC_API_TRACE_UNWRAP1(a) , a
#define GRPC_API_TRACE_UNWRAP2(a, b) , a, b
#define GRPC_API_TRACE_UNWRAP3(a, b, c) , a, b, c
#define GRPC_API_TRACE_UNWRAP4(a, b, c, d) , a, b, c, d
#define GRPC_API_TRACE_UNWRAP5(a, b, c, d, e) , a, b, c, d, e
#define GRPC_API_TRACE_UNWRAP6(a, b, c, d, e, f) , a, b, c, d, e, f
#define GRPC_API_TRACE_UNWRAP7(a, b, c, d, e, f, g) , a, b, c, d, e, f, g
#define GRPC_API_TRACE_UNWRAP8(a, b, c, d, e, f, g, h) , a, b, c, d, e, f, g, h
#define GRPC_API_TRACE_UNWRAP9(a, b, c, d, e, f, g, h, i) \
, a, b, c, d, e, f, g, h, i
#define GRPC_API_TRACE_UNWRAP10(a, b, c, d, e, f, g, h, i, j) \
, a, b, c, d, e, f, g, h, i, j
// Due to the limitations of C89's preprocessor, the arity of the var-arg list
// 'nargs' must be specified.
#define GRPC_API_TRACE(fmt, nargs, args) \
if (GRPC_TRACE_FLAG_ENABLED(api)) { \
gpr_log(GPR_INFO, fmt GRPC_API_TRACE_UNWRAP##nargs args); \
}
#endif // GRPC_SRC_CORE_LIB_SURFACE_API_TRACE_H

@ -92,7 +92,6 @@
#include "src/core/lib/resource_quota/arena.h"
#include "src/core/lib/slice/slice_buffer.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/surface/call_test_only.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/completion_queue.h"
@ -413,7 +412,8 @@ char* grpc_call_get_peer(grpc_call* call) {
}
grpc_call_error grpc_call_cancel(grpc_call* call, void* reserved) {
GRPC_API_TRACE("grpc_call_cancel(call=%p, reserved=%p)", 2, (call, reserved));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_call_cancel(call=" << call << ", reserved=" << reserved << ")";
CHECK_EQ(reserved, nullptr);
if (call == nullptr) {
return GRPC_CALL_ERROR;
@ -428,10 +428,9 @@ grpc_call_error grpc_call_cancel_with_status(grpc_call* c,
grpc_status_code status,
const char* description,
void* reserved) {
GRPC_API_TRACE(
"grpc_call_cancel_with_status("
"c=%p, status=%d, description=%s, reserved=%p)",
4, (c, (int)status, description, reserved));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_call_cancel_with_status(c=" << c << ", status=" << (int)status
<< ", description=" << description << ", reserved=" << reserved << ")";
CHECK_EQ(reserved, nullptr);
if (c == nullptr) {
return GRPC_CALL_ERROR;
@ -471,10 +470,10 @@ grpc_call_stack* grpc_call_get_call_stack(grpc_call* call) {
grpc_call_error grpc_call_start_batch(grpc_call* call, const grpc_op* ops,
size_t nops, void* tag, void* reserved) {
GRPC_API_TRACE(
"grpc_call_start_batch(call=%p, ops=%p, nops=%lu, tag=%p, "
"reserved=%p)",
5, (call, ops, (unsigned long)nops, tag, reserved));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_call_start_batch(call=" << call << ", ops=" << ops
<< ", nops=" << (unsigned long)nops << ", tag=" << tag
<< ", reserved=" << reserved << ")";
if (reserved != nullptr || call == nullptr) {
return GRPC_CALL_ERROR;

@ -45,7 +45,6 @@
#include "src/core/lib/promise/context.h"
#include "src/core/lib/resource_quota/arena.h"
#include "src/core/lib/slice/slice.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/transport/transport.h"
#include "src/core/server/server_interface.h"

@ -23,16 +23,17 @@
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/slice/slice.h"
#include "src/core/lib/surface/api_trace.h"
void grpc_call_details_init(grpc_call_details* details) {
GRPC_API_TRACE("grpc_call_details_init(details=%p)", 1, (details));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_call_details_init(details=" << details << ")";
details->method = grpc_empty_slice();
details->host = grpc_empty_slice();
}
void grpc_call_details_destroy(grpc_call_details* details) {
GRPC_API_TRACE("grpc_call_details_destroy(details=%p)", 1, (details));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_call_details_destroy(details=" << details << ")";
grpc_core::ExecCtx exec_ctx;
grpc_core::CSliceUnref(details->method);
grpc_core::CSliceUnref(details->host);

@ -31,7 +31,6 @@
#include "src/core/lib/compression/compression_internal.h"
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/telemetry/stats.h"
#include "src/core/telemetry/stats_data.h"
@ -95,7 +94,8 @@ Channel::RegisteredCall* Channel::RegisterCall(const char* method,
void grpc_channel_destroy(grpc_channel* channel) {
grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
grpc_core::ExecCtx exec_ctx;
GRPC_API_TRACE("grpc_channel_destroy(channel=%p)", 1, (channel));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_channel_destroy(channel=" << channel << ")";
grpc_channel_destroy_internal(channel);
}
@ -120,9 +120,9 @@ grpc_call* grpc_channel_create_call(grpc_channel* channel,
void* grpc_channel_register_call(grpc_channel* channel, const char* method,
const char* host, void* reserved) {
GRPC_API_TRACE(
"grpc_channel_register_call(channel=%p, method=%s, host=%s, reserved=%p)",
4, (channel, method, host, reserved));
GRPC_TRACE_LOG(api, INFO) << "grpc_channel_register_call(channel=" << channel
<< ", method=" << method << ", host=" << host
<< ", reserved=" << reserved << ")";
CHECK(!reserved);
grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
grpc_core::ExecCtx exec_ctx;
@ -135,18 +135,16 @@ grpc_call* grpc_channel_create_registered_call(
gpr_timespec deadline, void* reserved) {
auto* rc =
static_cast<grpc_core::Channel::RegisteredCall*>(registered_call_handle);
GRPC_API_TRACE(
"grpc_channel_create_registered_call("
"channel=%p, parent_call=%p, propagation_mask=%x, completion_queue=%p, "
"registered_call_handle=%p, "
"deadline=gpr_timespec { tv_sec: %" PRId64
", tv_nsec: %d, clock_type: %d }, "
"reserved=%p)",
9,
(channel, parent_call, (unsigned)propagation_mask, completion_queue,
registered_call_handle, deadline.tv_sec, deadline.tv_nsec,
(int)deadline.clock_type, reserved));
CHECK(!reserved);
GRPC_TRACE_LOG(api, INFO)
<< "grpc_channel_create_registered_call(channel=" << channel
<< ", parent_call=" << parent_call
<< ", propagation_mask=" << (unsigned)propagation_mask
<< ", completion_queue=" << completion_queue
<< ", registered_call_handle=" << registered_call_handle
<< ", deadline=gpr_timespec { tv_sec: " << deadline.tv_sec
<< ", tv_nsec: " << deadline.tv_nsec
<< ", clock_type: " << (int)deadline.clock_type
<< " }, reserved=" << reserved << ")";
grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
grpc_core::ExecCtx exec_ctx;
return grpc_core::Channel::FromC(channel)->CreateCall(
@ -159,7 +157,8 @@ grpc_call* grpc_channel_create_registered_call(
}
char* grpc_channel_get_target(grpc_channel* channel) {
GRPC_API_TRACE("grpc_channel_get_target(channel=%p)", 1, (channel));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_channel_get_target(channel=" << channel << ")";
auto target = grpc_core::Channel::FromC(channel)->target();
char* buffer = static_cast<char*>(gpr_zalloc(target.size() + 1));
memcpy(buffer, target.data(), target.size());
@ -176,8 +175,8 @@ void grpc_channel_get_info(grpc_channel* channel,
void grpc_channel_reset_connect_backoff(grpc_channel* channel) {
grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
grpc_core::ExecCtx exec_ctx;
GRPC_API_TRACE("grpc_channel_reset_connect_backoff(channel=%p)", 1,
(channel));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_channel_reset_connect_backoff(channel=" << channel << ")";
grpc_core::Channel::FromC(channel)->ResetConnectionBackoff();
}
@ -189,9 +188,9 @@ grpc_connectivity_state grpc_channel_check_connectivity_state(
grpc_channel* channel, int try_to_connect) {
grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
grpc_core::ExecCtx exec_ctx;
GRPC_API_TRACE(
"grpc_channel_check_connectivity_state(channel=%p, try_to_connect=%d)", 2,
(channel, try_to_connect));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_channel_check_connectivity_state(channel=" << channel
<< ", try_to_connect=" << try_to_connect << ")";
return grpc_core::Channel::FromC(channel)->CheckConnectivityState(
try_to_connect);
}
@ -201,15 +200,13 @@ void grpc_channel_watch_connectivity_state(
gpr_timespec deadline, grpc_completion_queue* cq, void* tag) {
grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
grpc_core::ExecCtx exec_ctx;
GRPC_API_TRACE(
"grpc_channel_watch_connectivity_state("
"channel=%p, last_observed_state=%d, "
"deadline=gpr_timespec { tv_sec: %" PRId64
", tv_nsec: %d, clock_type: %d }, "
"cq=%p, tag=%p)",
7,
(channel, (int)last_observed_state, deadline.tv_sec, deadline.tv_nsec,
(int)deadline.clock_type, cq, tag));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_channel_watch_connectivity_state(channel=" << channel
<< ", last_observed_state=" << (int)last_observed_state
<< ", deadline=gpr_timespec { tv_sec: " << deadline.tv_sec
<< ", tv_nsec: " << deadline.tv_nsec
<< ", clock_type: " << (int)deadline.clock_type << " }, cq=" << cq
<< ", tag=" << tag << ")";
return grpc_core::Channel::FromC(channel)->WatchConnectivityState(
last_observed_state, grpc_core::Timestamp::FromTimespecRoundUp(deadline),
cq, tag);
@ -218,8 +215,9 @@ void grpc_channel_watch_connectivity_state(
void grpc_channel_ping(grpc_channel* channel, grpc_completion_queue* cq,
void* tag, void* reserved) {
grpc_core::ExecCtx exec_ctx;
GRPC_API_TRACE("grpc_channel_ping(channel=%p, cq=%p, tag=%p, reserved=%p)", 4,
(channel, cq, tag, reserved));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_channel_ping(channel=" << channel << ", cq=" << cq
<< ", tag=" << tag << ", reserved=" << reserved << ")";
CHECK_EQ(reserved, nullptr);
grpc_core::Channel::FromC(channel)->Ping(cq, tag);
}

@ -105,10 +105,10 @@ grpc_channel* grpc_lame_client_channel_create(const char* target,
grpc_status_code error_code,
const char* error_message) {
grpc_core::ExecCtx exec_ctx;
GRPC_API_TRACE(
"grpc_lame_client_channel_create(target=%s, error_code=%d, "
"error_message=%s)",
3, (target, (int)error_code, error_message));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_lame_client_channel_create(target=" << target
<< ", error_code=" << (int)error_code
<< ", error_message=" << error_message << ")";
if (error_code == GRPC_STATUS_OK) error_code = GRPC_STATUS_UNKNOWN;
grpc_core::ChannelArgs args =
grpc_core::CoreConfiguration::Get()

@ -50,7 +50,6 @@
#include "src/core/lib/iomgr/executor.h"
#include "src/core/lib/iomgr/iomgr.h"
#include "src/core/lib/iomgr/pollset.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/surface/event_string.h"
#include "src/core/telemetry/stats.h"
#include "src/core/telemetry/stats_data.h"
@ -508,10 +507,9 @@ grpc_completion_queue* grpc_completion_queue_create_internal(
grpc_completion_queue_functor* shutdown_callback) {
grpc_completion_queue* cq;
GRPC_API_TRACE(
"grpc_completion_queue_create_internal(completion_type=%d, "
"polling_type=%d)",
2, (completion_type, polling_type));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_completion_queue_create_internal(completion_type="
<< completion_type << ", polling_type=" << polling_type << ")";
switch (completion_type) {
case GRPC_CQ_NEXT:
@ -697,10 +695,10 @@ static void cq_end_op_for_next(
if (GRPC_TRACE_FLAG_ENABLED(api) ||
(GRPC_TRACE_FLAG_ENABLED(op_failure) && !error.ok())) {
std::string errmsg = grpc_core::StatusToString(error);
GRPC_API_TRACE(
"cq_end_op_for_next(cq=%p, tag=%p, error=%s, "
"done=%p, done_arg=%p, storage=%p)",
6, (cq, tag, errmsg.c_str(), done, done_arg, storage));
GRPC_TRACE_LOG(api, INFO)
<< "cq_end_op_for_next(cq=" << cq << ", tag=" << tag
<< ", error=" << errmsg.c_str() << ", done=" << done
<< ", done_arg=" << done_arg << ", storage=" << storage << ")";
if (GRPC_TRACE_FLAG_ENABLED(op_failure) && !error.ok()) {
LOG(INFO) << "Operation failed: tag=" << tag << ", error=" << errmsg;
}
@ -770,10 +768,10 @@ static void cq_end_op_for_pluck(
if (GRPC_TRACE_FLAG_ENABLED(api) ||
(GRPC_TRACE_FLAG_ENABLED(op_failure) && !error.ok())) {
std::string errmsg = grpc_core::StatusToString(error);
GRPC_API_TRACE(
"cq_end_op_for_pluck(cq=%p, tag=%p, error=%s, "
"done=%p, done_arg=%p, storage=%p)",
6, (cq, tag, errmsg.c_str(), done, done_arg, storage));
GRPC_TRACE_LOG(api, INFO)
<< "cq_end_op_for_pluck(cq=" << cq << ", tag=" << tag
<< ", error=" << errmsg.c_str() << ", done=" << done
<< ", done_arg=" << done_arg << ", storage=" << storage << ")";
if (GRPC_TRACE_FLAG_ENABLED(op_failure) && !error.ok()) {
LOG(ERROR) << "Operation failed: tag=" << tag << ", error=" << errmsg;
}
@ -830,10 +828,10 @@ static void cq_end_op_for_callback(
if (GRPC_TRACE_FLAG_ENABLED(api) ||
(GRPC_TRACE_FLAG_ENABLED(op_failure) && !error.ok())) {
std::string errmsg = grpc_core::StatusToString(error);
GRPC_API_TRACE(
"cq_end_op_for_callback(cq=%p, tag=%p, error=%s, "
"done=%p, done_arg=%p, storage=%p)",
6, (cq, tag, errmsg.c_str(), done, done_arg, storage));
GRPC_TRACE_LOG(api, INFO)
<< "cq_end_op_for_callback(cq=" << cq << ", tag=" << tag
<< ", error=" << errmsg.c_str() << ", done=" << done
<< ", done_arg=" << done_arg << ", storage=" << storage << ")";
if (GRPC_TRACE_FLAG_ENABLED(op_failure) && !error.ok()) {
LOG(ERROR) << "Operation failed: tag=" << tag << ", error=" << errmsg;
}
@ -943,15 +941,12 @@ static grpc_event cq_next(grpc_completion_queue* cq, gpr_timespec deadline,
grpc_event ret;
cq_next_data* cqd = static_cast<cq_next_data*> DATA_FROM_CQ(cq);
GRPC_API_TRACE(
"grpc_completion_queue_next("
"cq=%p, "
"deadline=gpr_timespec { tv_sec: %" PRId64
", tv_nsec: %d, clock_type: %d }, "
"reserved=%p)",
5,
(cq, deadline.tv_sec, deadline.tv_nsec, (int)deadline.clock_type,
reserved));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_completion_queue_next(cq=" << cq
<< ", deadline=gpr_timespec { tv_sec: " << deadline.tv_sec
<< ", tv_nsec: " << deadline.tv_nsec
<< ", clock_type: " << (int)deadline.clock_type
<< " }, reserved=" << reserved << ")";
CHECK(!reserved);
dump_pending_tags(cq);
@ -1187,15 +1182,12 @@ static grpc_event cq_pluck(grpc_completion_queue* cq, void* tag,
cq_pluck_data* cqd = static_cast<cq_pluck_data*> DATA_FROM_CQ(cq);
if (GRPC_TRACE_FLAG_ENABLED(queue_pluck)) {
GRPC_API_TRACE(
"grpc_completion_queue_pluck("
"cq=%p, tag=%p, "
"deadline=gpr_timespec { tv_sec: %" PRId64
", tv_nsec: %d, clock_type: %d }, "
"reserved=%p)",
6,
(cq, tag, deadline.tv_sec, deadline.tv_nsec, (int)deadline.clock_type,
reserved));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_completion_queue_pluck(cq=" << cq << ", tag=" << tag
<< ", deadline=gpr_timespec { tv_sec: " << deadline.tv_sec
<< ", tv_nsec: " << deadline.tv_nsec
<< ", clock_type: " << (int)deadline.clock_type
<< " }, reserved=" << reserved << ")";
}
CHECK(!reserved);
@ -1383,12 +1375,13 @@ static void cq_shutdown_callback(grpc_completion_queue* cq) {
void grpc_completion_queue_shutdown(grpc_completion_queue* cq) {
grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
grpc_core::ExecCtx exec_ctx;
GRPC_API_TRACE("grpc_completion_queue_shutdown(cq=%p)", 1, (cq));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_completion_queue_shutdown(cq=" << cq << ")";
cq->vtable->shutdown(cq);
}
void grpc_completion_queue_destroy(grpc_completion_queue* cq) {
GRPC_API_TRACE("grpc_completion_queue_destroy(cq=%p)", 1, (cq));
GRPC_TRACE_LOG(api, INFO) << "grpc_completion_queue_destroy(cq=" << cq << ")";
grpc_completion_queue_shutdown(cq);
grpc_core::ExecCtx exec_ctx;

@ -59,7 +59,6 @@
#include "src/core/lib/resource_quota/arena.h"
#include "src/core/lib/slice/slice_buffer.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/surface/call_utils.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/completion_queue.h"
@ -269,7 +268,7 @@ void FilterStackCall::ExternalUnref() {
ApplicationCallbackExecCtx callback_exec_ctx;
ExecCtx exec_ctx;
GRPC_API_TRACE("grpc_call_unref(c=%p)", 1, (this));
GRPC_TRACE_LOG(api, INFO) << "grpc_call_unref(c=" << this << ")";
MaybeUnpublishFromParent();

@ -45,7 +45,6 @@
#include "src/core/lib/security/credentials/credentials.h"
#include "src/core/lib/security/security_connector/security_connector.h"
#include "src/core/lib/security/transport/auth_filters.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/surface/channel_stack_type.h"
#include "src/core/lib/surface/init_internally.h"
@ -128,7 +127,7 @@ void grpc_init(void) {
grpc_iomgr_start();
}
GRPC_API_TRACE("grpc_init(void)", 0, ());
GRPC_TRACE_LOG(api, INFO) << "grpc_init(void)";
}
void grpc_shutdown_internal_locked(void)
@ -149,7 +148,7 @@ void grpc_shutdown_internal_locked(void)
}
void grpc_shutdown_from_cleanup_thread(void* /*ignored*/) {
GRPC_API_TRACE("grpc_shutdown_from_cleanup_thread", 0, ());
GRPC_TRACE_LOG(api, INFO) << "grpc_shutdown_from_cleanup_thread";
grpc_core::MutexLock lock(g_init_mu);
// We have released lock from the shutdown thread and it is possible that
// another grpc_init has been called, and do nothing if that is the case.
@ -161,7 +160,7 @@ void grpc_shutdown_from_cleanup_thread(void* /*ignored*/) {
}
void grpc_shutdown(void) {
GRPC_API_TRACE("grpc_shutdown(void)", 0, ());
GRPC_TRACE_LOG(api, INFO) << "grpc_shutdown(void)";
grpc_core::MutexLock lock(g_init_mu);
if (--g_initializations == 0) {
@ -194,7 +193,7 @@ void grpc_shutdown(void) {
}
void grpc_shutdown_blocking(void) {
GRPC_API_TRACE("grpc_shutdown_blocking(void)", 0, ());
GRPC_TRACE_LOG(api, INFO) << "grpc_shutdown_blocking(void)";
grpc_core::MutexLock lock(g_init_mu);
if (--g_initializations == 0) {
g_shutting_down = true;

@ -42,7 +42,6 @@
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/promise/pipe.h"
#include "src/core/lib/promise/promise.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/channel_stack_type.h"
#include "src/core/lib/transport/connectivity_state.h"

@ -23,14 +23,15 @@
#include <grpc/support/port_platform.h>
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/surface/api_trace.h"
void grpc_metadata_array_init(grpc_metadata_array* array) {
GRPC_API_TRACE("grpc_metadata_array_init(array=%p)", 1, (array));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_metadata_array_init(array=" << array << ")";
memset(array, 0, sizeof(*array));
}
void grpc_metadata_array_destroy(grpc_metadata_array* array) {
GRPC_API_TRACE("grpc_metadata_array_destroy(array=%p)", 1, (array));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_metadata_array_destroy(array=" << array << ")";
gpr_free(array->metadata);
}

@ -71,7 +71,6 @@
#include "src/core/lib/promise/try_seq.h"
#include "src/core/lib/slice/slice_buffer.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/surface/call.h"
#include "src/core/lib/surface/call_utils.h"
#include "src/core/lib/surface/channel.h"
@ -1777,7 +1776,8 @@ void Server::CallData::StartTransportStreamOpBatch(
grpc_server* grpc_server_create(const grpc_channel_args* args, void* reserved) {
grpc_core::ExecCtx exec_ctx;
GRPC_API_TRACE("grpc_server_create(%p, %p)", 2, (args, reserved));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_server_create(" << args << ", " << reserved << ")";
grpc_core::Server* server =
new grpc_core::Server(grpc_core::CoreConfiguration::Get()
.channel_args_preconditioning()
@ -1788,9 +1788,9 @@ grpc_server* grpc_server_create(const grpc_channel_args* args, void* reserved) {
void grpc_server_register_completion_queue(grpc_server* server,
grpc_completion_queue* cq,
void* reserved) {
GRPC_API_TRACE(
"grpc_server_register_completion_queue(server=%p, cq=%p, reserved=%p)", 3,
(server, cq, reserved));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_server_register_completion_queue(server=" << server
<< ", cq=" << cq << ", reserved=" << reserved << ")";
CHECK(!reserved);
auto cq_type = grpc_get_cq_completion_type(cq);
if (cq_type != GRPC_CQ_NEXT && cq_type != GRPC_CQ_CALLBACK) {
@ -1806,17 +1806,16 @@ void* grpc_server_register_method(
grpc_server* server, const char* method, const char* host,
grpc_server_register_method_payload_handling payload_handling,
uint32_t flags) {
GRPC_API_TRACE(
"grpc_server_register_method(server=%p, method=%s, host=%s, "
"flags=0x%08x)",
4, (server, method, host, flags));
GRPC_TRACE_LOG(api, INFO) << "grpc_server_register_method(server=" << server
<< ", method=" << method << ", host=" << host
<< ", flags=" << absl::StrFormat("0x%08x", flags);
return grpc_core::Server::FromC(server)->RegisterMethod(
method, host, payload_handling, flags);
}
void grpc_server_start(grpc_server* server) {
grpc_core::ExecCtx exec_ctx;
GRPC_API_TRACE("grpc_server_start(server=%p)", 1, (server));
GRPC_TRACE_LOG(api, INFO) << "grpc_server_start(server=" << server << ")";
grpc_core::Server::FromC(server)->Start();
}
@ -1824,22 +1823,24 @@ void grpc_server_shutdown_and_notify(grpc_server* server,
grpc_completion_queue* cq, void* tag) {
grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
grpc_core::ExecCtx exec_ctx;
GRPC_API_TRACE("grpc_server_shutdown_and_notify(server=%p, cq=%p, tag=%p)", 3,
(server, cq, tag));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_server_shutdown_and_notify(server=" << server << ", cq=" << cq
<< ", tag=" << tag << ")";
grpc_core::Server::FromC(server)->ShutdownAndNotify(cq, tag);
}
void grpc_server_cancel_all_calls(grpc_server* server) {
grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
grpc_core::ExecCtx exec_ctx;
GRPC_API_TRACE("grpc_server_cancel_all_calls(server=%p)", 1, (server));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_server_cancel_all_calls(server=" << server << ")";
grpc_core::Server::FromC(server)->CancelAllCalls();
}
void grpc_server_destroy(grpc_server* server) {
grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
grpc_core::ExecCtx exec_ctx;
GRPC_API_TRACE("grpc_server_destroy(server=%p)", 1, (server));
GRPC_TRACE_LOG(api, INFO) << "grpc_server_destroy(server=" << server << ")";
grpc_core::Server::FromC(server)->Orphan();
}
@ -1850,13 +1851,12 @@ grpc_call_error grpc_server_request_call(
grpc_completion_queue* cq_for_notification, void* tag) {
grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
grpc_core::ExecCtx exec_ctx;
GRPC_API_TRACE(
"grpc_server_request_call("
"server=%p, call=%p, details=%p, initial_metadata=%p, "
"cq_bound_to_call=%p, cq_for_notification=%p, tag=%p)",
7,
(server, call, details, request_metadata, cq_bound_to_call,
cq_for_notification, tag));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_server_request_call("
<< "server=" << server << ", call=" << call << ", details=" << details
<< ", initial_metadata=" << request_metadata
<< ", cq_bound_to_call=" << cq_bound_to_call
<< ", cq_for_notification=" << cq_for_notification << ", tag=" << tag;
return grpc_core::Server::FromC(server)->RequestCall(
call, details, request_metadata, cq_bound_to_call, cq_for_notification,
tag);
@ -1872,15 +1872,15 @@ grpc_call_error grpc_server_request_registered_call(
grpc_core::ExecCtx exec_ctx;
auto* rm =
static_cast<grpc_core::Server::RegisteredMethod*>(registered_method);
GRPC_API_TRACE(
"grpc_server_request_registered_call("
"server=%p, registered_method=%p, call=%p, deadline=%p, "
"request_metadata=%p, "
"optional_payload=%p, cq_bound_to_call=%p, cq_for_notification=%p, "
"tag=%p)",
9,
(server, registered_method, call, deadline, request_metadata,
optional_payload, cq_bound_to_call, cq_for_notification, tag_new));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_server_request_registered_call("
<< "server=" << server << ", registered_method=" << registered_method
<< ", call=" << call << ", deadline=" << deadline
<< ", request_metadata=" << request_metadata
<< ", optional_payload=" << optional_payload
<< ", cq_bound_to_call=" << cq_bound_to_call
<< ", cq_for_notification=" << cq_for_notification << ", tag=" << tag_new
<< ")";
return grpc_core::Server::FromC(server)->RequestRegisteredCall(
rm, call, deadline, request_metadata, optional_payload, cq_bound_to_call,
cq_for_notification, tag_new);
@ -1890,8 +1890,9 @@ void grpc_server_set_config_fetcher(
grpc_server* server, grpc_server_config_fetcher* server_config_fetcher) {
grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
grpc_core::ExecCtx exec_ctx;
GRPC_API_TRACE("grpc_server_set_config_fetcher(server=%p, config_fetcher=%p)",
2, (server, server_config_fetcher));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_server_set_config_fetcher(server=" << server
<< ", config_fetcher=" << server_config_fetcher << ")";
grpc_core::Server::FromC(server)->set_config_fetcher(
std::unique_ptr<grpc_server_config_fetcher>(server_config_fetcher));
}
@ -1900,7 +1901,8 @@ void grpc_server_config_fetcher_destroy(
grpc_server_config_fetcher* server_config_fetcher) {
grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
grpc_core::ExecCtx exec_ctx;
GRPC_API_TRACE("grpc_server_config_fetcher_destroy(config_fetcher=%p)", 1,
(server_config_fetcher));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_server_config_fetcher_destroy(config_fetcher="
<< server_config_fetcher << ")";
delete server_config_fetcher;
}

@ -70,7 +70,6 @@
#include "src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h"
#include "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h"
#include "src/core/lib/security/credentials/xds/xds_credentials.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/transport/metadata_batch.h"
#include "src/core/lib/uri/uri_parser.h"
#include "src/core/server/server.h"
@ -1363,10 +1362,11 @@ grpc_server_config_fetcher* grpc_server_config_fetcher_xds_create(
grpc_core::ChannelArgs channel_args = grpc_core::CoreConfiguration::Get()
.channel_args_preconditioning()
.PreconditionChannelArgs(args);
GRPC_API_TRACE(
"grpc_server_config_fetcher_xds_create(notifier={on_serving_status_"
"update=%p, user_data=%p}, args=%p)",
3, (notifier.on_serving_status_update, notifier.user_data, args));
GRPC_TRACE_LOG(api, INFO)
<< "grpc_server_config_fetcher_xds_create(notifier={on_serving_status_"
"update="
<< notifier.on_serving_status_update
<< ", user_data=" << notifier.user_data << "}, args=" << args << ")";
auto xds_client = grpc_core::GrpcXdsClient::GetOrCreate(
grpc_core::GrpcXdsClient::kServerKey, channel_args,
"XdsServerConfigFetcher");

@ -36,7 +36,6 @@
#include <grpcpp/server_context.h>
#include "src/core/lib/gprpp/env.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include "test/core/test_util/port.h"

@ -2647,7 +2647,6 @@ src/core/lib/slice/slice_internal.h \
src/core/lib/slice/slice_refcount.h \
src/core/lib/slice/slice_string_helpers.cc \
src/core/lib/slice/slice_string_helpers.h \
src/core/lib/surface/api_trace.h \
src/core/lib/surface/byte_buffer.cc \
src/core/lib/surface/byte_buffer_reader.cc \
src/core/lib/surface/call.cc \

@ -2420,7 +2420,6 @@ src/core/lib/slice/slice_refcount.h \
src/core/lib/slice/slice_string_helpers.cc \
src/core/lib/slice/slice_string_helpers.h \
src/core/lib/surface/README.md \
src/core/lib/surface/api_trace.h \
src/core/lib/surface/byte_buffer.cc \
src/core/lib/surface/byte_buffer_reader.cc \
src/core/lib/surface/call.cc \

Loading…
Cancel
Save