Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ bazel_dep(name = "opentracing-cpp", version = "1.6.0", repo_name = "com_github_o
bazel_dep(name = "platforms", version = "0.0.11")
bazel_dep(name = "prometheus-cpp", version = "1.3.0", repo_name = "com_github_jupp0r_prometheus_cpp")
bazel_dep(name = "protobuf", version = "29.0", repo_name = "com_google_protobuf")
bazel_dep(name = "rapidyaml", version = "0.9.0")
bazel_dep(name = "rules_proto", version = "7.0.2")
bazel_dep(name = "zlib", version = "1.3.1.bcr.5")

Expand Down
11 changes: 7 additions & 4 deletions ci/do_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -536,8 +536,11 @@ EOF
examples/plugin/load/load_plugin_example ${PLUGIN_DIR}/libexample_plugin.so /dev/null
exit 0
elif [[ "$1" == "bazel.no_bzlmod.test" ]]; then
bazel $BAZEL_STARTUP_OPTIONS build --enable_bzlmod=false $BAZEL_OPTIONS //...
bazel $BAZEL_STARTUP_OPTIONS test --enable_bzlmod=false $BAZEL_TEST_OPTIONS //...
# Rapidyaml 0.9.0 as is does not support bazel,
# modules in bazel central repository required
# to build configuration.
bazel $BAZEL_STARTUP_OPTIONS build --enable_bzlmod=false $BAZEL_OPTIONS -- //... -//examples/configuration/... -//sdk/src/configuration/... -//sdk/test/configuration/...
bazel $BAZEL_STARTUP_OPTIONS test --enable_bzlmod=false $BAZEL_TEST_OPTIONS -- //... -//examples/configuration/... -//sdk/src/configuration/... -//sdk/test/configuration/...
exit 0
elif [[ "$1" == "bazel.test" ]]; then
bazel $BAZEL_STARTUP_OPTIONS build $BAZEL_OPTIONS $BAZEL_WITH_PREVIEW //...
Expand All @@ -564,8 +567,8 @@ elif [[ "$1" == "bazel.noexcept" ]]; then
# there are some exceptions and error handling code from the Prometheus Client
# as well as Opentracing shim (due to some third party code in its Opentracing dependency)
# that make this test always fail. Ignore these packages in the noexcept test here.
bazel $BAZEL_STARTUP_OPTIONS build --copt=-fno-exceptions $BAZEL_OPTIONS_ASYNC -- //... -//exporters/prometheus/... -//examples/prometheus/... -//opentracing-shim/...
bazel $BAZEL_STARTUP_OPTIONS test --copt=-fno-exceptions $BAZEL_TEST_OPTIONS_ASYNC -- //... -//exporters/prometheus/... -//examples/prometheus/... -//opentracing-shim/...
bazel $BAZEL_STARTUP_OPTIONS build --copt=-fno-exceptions $BAZEL_OPTIONS_ASYNC -- //... -//exporters/prometheus/... -//examples/prometheus/... -//opentracing-shim/... -//examples/configuration/... -//sdk/src/configuration/... -//sdk/test/configuration/...
bazel $BAZEL_STARTUP_OPTIONS test --copt=-fno-exceptions $BAZEL_TEST_OPTIONS_ASYNC -- //... -//exporters/prometheus/... -//examples/prometheus/... -//opentracing-shim/... -//examples/configuration/... -//sdk/src/configuration/... -//sdk/test/configuration/...
exit 0
elif [[ "$1" == "bazel.nortti" ]]; then
# there are some exceptions and error handling code from the Prometheus Client
Expand Down
43 changes: 43 additions & 0 deletions examples/configuration/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0

cc_binary(
name = "example_yaml",
srcs = glob(["*.cc"]) + glob(["*.h"]),
defines = [
"OTEL_HAVE_OTLP_HTTP",
"OTEL_HAVE_OTLP_GRPC",
"OTEL_HAVE_OTLP_FILE",
"OTEL_HAVE_ZIPKIN",
"OTEL_HAVE_PROMETHEUS",
],
tags = [
"test",
"yaml",
],
deps = [
"//api",
"//examples/common/logs_foo_library:common_logs_foo_library",
"//examples/common/metrics_foo_library:common_metrics_foo_library",
"//exporters/ostream:ostream_log_record_exporter_builder",
"//exporters/ostream:ostream_metric_exporter_builder",
"//exporters/ostream:ostream_span_exporter_builder",
"//exporters/otlp:otlp_file_log_record_exporter_builder",
"//exporters/otlp:otlp_file_metric_exporter_builder",
"//exporters/otlp:otlp_file_span_exporter_builder",
"//exporters/otlp:otlp_grpc_log_record_exporter_builder",
"//exporters/otlp:otlp_grpc_metric_exporter_builder",
"//exporters/otlp:otlp_grpc_span_exporter_builder",
"//exporters/otlp:otlp_http_log_record_exporter_builder",
"//exporters/otlp:otlp_http_metric_exporter_builder",
"//exporters/otlp:otlp_http_span_exporter_builder",
"//exporters/prometheus:prometheus_exporter_builder",
"//exporters/zipkin:zipkin_exporter_builder",
"//sdk:headers",
"//sdk/src/configuration",
"//sdk/src/logs",
"//sdk/src/metrics",
"//sdk/src/trace",
"@com_google_googletest//:gtest_main",
],
)
48 changes: 48 additions & 0 deletions exporters/ostream/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,21 @@ cc_library(
],
)

cc_library(
name = "ostream_log_record_exporter_builder",
srcs = [
"src/console_log_record_builder.cc",
],
hdrs = [
"include/opentelemetry/exporters/ostream/console_log_record_builder.h",
],
strip_include_prefix = "include",
tags = ["ostream"],
deps = [
":ostream_log_record_exporter",
],
)

cc_test(
name = "ostream_log_test",
srcs = ["test/ostream_log_test.cc"],
Expand Down Expand Up @@ -55,6 +70,24 @@ cc_library(
],
)

cc_library(
name = "ostream_metric_exporter_builder",
srcs = [
"src/console_push_metric_builder.cc",
],
hdrs = [
"include/opentelemetry/exporters/ostream/console_push_metric_builder.h",
],
strip_include_prefix = "include",
tags = [
"metrics",
"ostream",
],
deps = [
":ostream_metric_exporter",
],
)

cc_test(
name = "ostream_metric_test",
srcs = ["test/ostream_metric_test.cc"],
Expand Down Expand Up @@ -86,6 +119,21 @@ cc_library(
],
)

cc_library(
name = "ostream_span_exporter_builder",
srcs = [
"src/console_span_builder.cc",
],
hdrs = [
"include/opentelemetry/exporters/ostream/console_span_builder.h",
],
strip_include_prefix = "include",
tags = ["ostream"],
deps = [
":ostream_span_exporter",
],
)

cc_library(
name = "ostream_capture",
hdrs = [
Expand Down
Loading
Loading