-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jaeger bazel (Linux only) #1077
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
e6ee497
jaeger bazel
esigo 37be184
ci fix
esigo 40b6c2f
ci Linux only
esigo b1eb4c0
md lint
esigo 9038fee
jaeger enable exception
esigo ce9a15b
ci mac
esigo a0478cb
ci Windows
esigo 04c44ce
Merge branch 'main' into jaeger-bazel
esigo 4db0909
Merge branch 'main' into jaeger-bazel
esigo 7414e34
Merge branch 'main' into jaeger-bazel
esigo 0df6818
Merge branch 'main' into jaeger-bazel
esigo 51550d5
Merge branch 'main' into jaeger-bazel
esigo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
# TODO: enable bazel build | ||
# cc_binary( | ||
# name = "example_jaeger", | ||
# srcs = [ | ||
# "main.cc", | ||
# ], | ||
# deps = [ | ||
# "//examples/common/foo_library:common_foo_library", | ||
# "//api", | ||
# "//exporters/jaeger:jaeger_exporter", | ||
# "//sdk/src/trace", | ||
# ], | ||
# ) | ||
cc_binary( | ||
name = "example_jaeger", | ||
srcs = [ | ||
"main.cc", | ||
], | ||
tags = ["jaeger"], | ||
deps = [ | ||
"//api", | ||
"//examples/common/foo_library:common_foo_library", | ||
"//exporters/jaeger:opentelemetry_exporter_jaeger_trace", | ||
"//sdk/src/trace", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
package(default_visibility = ["//visibility:public"]) | ||
|
||
load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake") | ||
|
||
cmake( | ||
name = "thrift", | ||
cache_entries = { | ||
"CMAKE_BUILD_TYPE": "Release", | ||
"BUILD_COMPILER": "OFF", | ||
"BUILD_CPP": "ON", | ||
"BUILD_LIBRARIES": "ON", | ||
"BUILD_NODEJS": "OFF", | ||
"BUILD_PYTHON": "OFF", | ||
"BUILD_JAVASCRIPT": "OFF", | ||
"BUILD_C_GLIB": "OFF", | ||
"BUILD_JAVA": "OFF", | ||
"BUILD_TESTING": "OFF", | ||
"BUILD_TUTORIALS": "OFF", | ||
"WITH_HASKELL": "OFF", | ||
"CMAKE_CXX_FLAGS": "-fexceptions", | ||
}, | ||
lib_source = "@thrift//:all_srcs", | ||
out_static_libs = [ | ||
"libthrift.a", | ||
"libthriftnb.a", | ||
"libthriftz.a", | ||
], | ||
tags = ["jaeger"], | ||
target_compatible_with = [ | ||
"@platforms//os:linux", | ||
], | ||
) | ||
|
||
cc_library( | ||
name = "jaeger_thrift_gencpp", | ||
srcs = [ | ||
"thrift-gen/Agent.cpp", | ||
"thrift-gen/Collector.cpp", | ||
"thrift-gen/ZipkinCollector.cpp", | ||
"thrift-gen/jaeger_types.cpp", | ||
"thrift-gen/zipkincore_constants.cpp", | ||
"thrift-gen/zipkincore_types.cpp", | ||
], | ||
hdrs = [ | ||
"thrift-gen/Agent.h", | ||
"thrift-gen/Collector.h", | ||
"thrift-gen/ZipkinCollector.h", | ||
"thrift-gen/agent_types.h", | ||
"thrift-gen/jaeger_types.h", | ||
"thrift-gen/zipkincore_constants.h", | ||
"thrift-gen/zipkincore_types.h", | ||
], | ||
copts = ["-fexceptions"], | ||
strip_include_prefix = "thrift-gen", | ||
tags = ["jaeger"], | ||
deps = [ | ||
":thrift", | ||
"//ext/src/http/client/curl:http_client_curl", | ||
], | ||
) | ||
|
||
cc_library( | ||
name = "jaeger_exporter", | ||
srcs = [ | ||
], | ||
hdrs = [ | ||
"src/THttpTransport.h", | ||
"src/TUDPTransport.h", | ||
"src/http_transport.h", | ||
"src/sender.h", | ||
"src/thrift_sender.h", | ||
"src/transport.h", | ||
"src/udp_transport.h", | ||
], | ||
copts = ["-fexceptions"], | ||
strip_include_prefix = "src", | ||
tags = ["jaeger"], | ||
deps = [ | ||
":jaeger_thrift_gencpp", | ||
], | ||
) | ||
|
||
cc_library( | ||
name = "opentelemetry_exporter_jaeger_trace", | ||
srcs = [ | ||
"src/THttpTransport.cc", | ||
"src/TUDPTransport.cc", | ||
"src/http_transport.cc", | ||
"src/jaeger_exporter.cc", | ||
"src/recordable.cc", | ||
"src/thrift_sender.cc", | ||
"src/udp_transport.cc", | ||
], | ||
hdrs = [ | ||
"include/opentelemetry/exporters/jaeger/jaeger_exporter.h", | ||
"include/opentelemetry/exporters/jaeger/recordable.h", | ||
], | ||
copts = ["-fexceptions"], | ||
strip_include_prefix = "include", | ||
tags = ["jaeger"], | ||
deps = [ | ||
":jaeger_exporter", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use
rules_foreign_cc
to build and install boost library too - if that helps to support for Windows? Probably, we can create a github issue for Windows support, for someone to pick it up.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I'll raise another PR for Windows support.