@@ -22,17 +22,31 @@ cc_library(
2222)
2323
2424cc_library (
25- name = "otlp_recordable " ,
25+ name = "otlp_common " ,
2626 srcs = [
2727 "src/otlp_environment.cc" ,
28+ ],
29+ hdrs = [
30+ "include/opentelemetry/exporters/otlp/otlp_environment.h" ,
31+ ],
32+ strip_include_prefix = "include" ,
33+ tags = ["otlp" ],
34+ deps = [
35+ "//api" ,
36+ "//sdk/src/common:env_variables" ,
37+ ],
38+ )
39+
40+ cc_library (
41+ name = "otlp_recordable" ,
42+ srcs = [
2843 "src/otlp_log_recordable.cc" ,
2944 "src/otlp_metric_utils.cc" ,
3045 "src/otlp_populate_attribute_utils.cc" ,
3146 "src/otlp_recordable.cc" ,
3247 "src/otlp_recordable_utils.cc" ,
3348 ],
3449 hdrs = [
35- "include/opentelemetry/exporters/otlp/otlp_environment.h" ,
3650 "include/opentelemetry/exporters/otlp/otlp_log_recordable.h" ,
3751 "include/opentelemetry/exporters/otlp/otlp_metric_utils.h" ,
3852 "include/opentelemetry/exporters/otlp/otlp_populate_attribute_utils.h" ,
@@ -98,6 +112,7 @@ cc_library(
98112 "otlp_grpc" ,
99113 ],
100114 deps = [
115+ ":otlp_common" ,
101116 "//ext:headers" ,
102117 "//sdk/src/common:global_log_handler" ,
103118 "@com_github_grpc_grpc//:grpc++" ,
@@ -144,6 +159,7 @@ cc_library(
144159 "otlp_grpc" ,
145160 ],
146161 deps = [
162+ ":otlp_common" ,
147163 ":otlp_recordable" ,
148164 ":otlp_grpc_client" ,
149165 "//ext:headers" ,
@@ -237,6 +253,7 @@ cc_library(
237253 "otlp_http" ,
238254 ],
239255 deps = [
256+ ":otlp_common" ,
240257 ":otlp_http_client" ,
241258 ":otlp_recordable" ,
242259 "//sdk/src/trace" ,
@@ -313,6 +330,7 @@ cc_library(
313330 "otlp_file" ,
314331 ],
315332 deps = [
333+ ":otlp_common" ,
316334 ":otlp_file_client" ,
317335 ":otlp_recordable" ,
318336 "//sdk/src/trace" ,
@@ -361,6 +379,7 @@ cc_library(
361379 "otlp_grpc_metric" ,
362380 ],
363381 deps = [
382+ ":otlp_common" ,
364383 ":otlp_recordable" ,
365384 ":otlp_grpc_client" ,
366385 "//ext:headers" ,
@@ -413,6 +432,7 @@ cc_library(
413432 "otlp_http_metric" ,
414433 ],
415434 deps = [
435+ ":otlp_common" ,
416436 ":otlp_http_client" ,
417437 ":otlp_recordable" ,
418438 "//sdk/src/metrics" ,
@@ -461,6 +481,7 @@ cc_library(
461481 "otlp_file_metric" ,
462482 ],
463483 deps = [
484+ ":otlp_common" ,
464485 ":otlp_file_client" ,
465486 ":otlp_recordable" ,
466487 "//sdk/src/metrics" ,
@@ -509,6 +530,7 @@ cc_library(
509530 "otlp_http_log" ,
510531 ],
511532 deps = [
533+ ":otlp_common" ,
512534 ":otlp_http_client" ,
513535 ":otlp_recordable" ,
514536 "//sdk/src/logs" ,
@@ -557,6 +579,7 @@ cc_library(
557579 "otlp_file_log" ,
558580 ],
559581 deps = [
582+ ":otlp_common" ,
560583 ":otlp_file_client" ,
561584 ":otlp_recordable" ,
562585 "//sdk/src/logs" ,
@@ -606,6 +629,7 @@ cc_library(
606629 "otlp_grpc_log" ,
607630 ],
608631 deps = [
632+ ":otlp_common" ,
609633 ":otlp_recordable" ,
610634 ":otlp_grpc_client" ,
611635 "//ext:headers" ,
0 commit comments