-
Notifications
You must be signed in to change notification settings - Fork 449
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
Question: How to import otlp_http_exporter
in a bazel project?
#1032
Comments
As mentioned here: https://github.com/open-telemetry/opentelemetry-cpp/blob/main/INSTALL.md#build-instructions-using-bazel, bazel support is experimental, so any contribution here to make it complete are welcome :) cc @jsuereth |
You need to call Your # https://github.com/open-telemetry/opentelemetry-cpp
new_git_repo
name = "opentelemetry-cpp",
commit = "096c08b6b6dbd8645eebdccc8c06b83fa7a50cd3",
remote = "https://github.com/open-telemetry/opentelemetry-cpp",
)
load("@opentelemetry-cpp//bazel:repository.bzl", "opentelemetry_cpp_deps")
opentelemetry_cpp_deps() Either that or pull in all the external repositories it needs yourself directly. |
Thanks, @jlisee. This is how |
@jlisee Thank you very much! I will try this as soon as I can and post results here. |
@lalitb @jlisee I have some updates :-) First of all - thank you again @jlisee for your suggestions. Provided solution works with two caveats:
|
@miiila - OpenTelemetry is hosted under CNCF ( https://www.cncf.io/, just like Kubernetes), and signing CLA is a pre-requisite for any contribution as a company, employee, or individual for CNCF hosted projects. As an individual, this is what you would sign for: https://github.com/cncf/cla/blob/master/individual-cla.pdf |
Hey everybody, I have a question about importing
otlp_http_exporter
in a bazel project. I tried adding following into my WORKSPACE file:Then I added
"@opentelemetry-cpp//exporters/otlp:otlp_http_exporter"
intodeps
in my BUILD file. I also tried experimenting with variousstrip_prefix
andbuild_file
rules, but the best outcome was an errorno such package '@github_nlohmann_json//'
.May I ask for a help/guidance how to use
opentelemetry-cpp
as a dependency in a another bazel project? Reproducible example would be great.Thank you in advance.
The text was updated successfully, but these errors were encountered: