Skip to content
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

opentelemetry-cpp: fix visibility of protobuf and gRPC headers #19793

Closed
wants to merge 1 commit into from

Conversation

tuxu
Copy link
Contributor

@tuxu tuxu commented Sep 13, 2023

Protobuf and gRPC headers must be made available for consumers of the OpenTelemetry package because the generated headers for OTLP refer to them.

This fixes the following compiler errors downstream:

In file included from $HOME/.conan2/p/b/opent272c3e9f1254c/p/include/opentelemetry/exporters/otlp/otlp_grpc_exporter.h:11:
In file included from $HOME/.conan2/p/b/opent272c3e9f1254c/p/include/opentelemetry/proto/collector/trace/v1/trace_service.grpc.pb.h:22:
$HOME/.conan2/p/b/opent272c3e9f1254c/p/include/opentelemetry/proto/collector/trace/v1/trace_service.pb.h:10:10: fatal error: 'google/protobuf/port_def.inc' file not found
In file included from $HOME/.conan2/p/b/opentde6f16d8c2837/p/include/opentelemetry/exporters/otlp/otlp_grpc_exporter.h:11:
$HOME/.conan2/p/b/opentde6f16d8c2837/p/include/opentelemetry/proto/collector/trace/v1/trace_service.grpc.pb.h:25:10: fatal error: 'grpcpp/generic/async_generic_service.h' file not found

Protobuf and gRPC headers must be made available for consumers of the
OpenTelemetry package because the generated headers for OTLP refer to
them.

This fixes the following compiler errors downstream:

```
In file included from $HOME/.conan2/p/b/opent272c3e9f1254c/p/include/opentelemetry/exporters/otlp/otlp_grpc_exporter.h:11:
In file included from $HOME/.conan2/p/b/opent272c3e9f1254c/p/include/opentelemetry/proto/collector/trace/v1/trace_service.grpc.pb.h:22:
$HOME/.conan2/p/b/opent272c3e9f1254c/p/include/opentelemetry/proto/collector/trace/v1/trace_service.pb.h:10:10: fatal error: 'google/protobuf/port_def.inc' file not found
```

```
In file included from $HOME/.conan2/p/b/opentde6f16d8c2837/p/include/opentelemetry/exporters/otlp/otlp_grpc_exporter.h:11:
$HOME/.conan2/p/b/opentde6f16d8c2837/p/include/opentelemetry/proto/collector/trace/v1/trace_service.grpc.pb.h:25:10: fatal error: 'grpcpp/generic/async_generic_service.h' file not found
```
@ghost
Copy link

ghost commented Sep 13, 2023

I detected other pull requests that are modifying opentelemetry-cpp/all recipe:

This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prs so don't hesitate to report issues/improvements there.

Copy link
Member

@AbrilRBS AbrilRBS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix and the context around it, really appreciated :)

Edit: I see v2 is failing with: ERROR: opentelemetry-cpp/1.3.0: required component package 'opentelemetry-proto::' not in dependencies

@tuxu
Copy link
Contributor Author

tuxu commented Sep 13, 2023

@RubenRBS

Edit: I see v2 is failing with: ERROR: opentelemetry-cpp/1.3.0: required component package 'opentelemetry-proto::' not in dependencies

That's fixed by #19759 🙂

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

All green in build 1 (a29e07940aa3ed676d1c8b2df5f52b6dcf29502c):

  • opentelemetry-cpp/1.9.1:
    All packages built successfully! (All logs)

  • opentelemetry-cpp/1.2.0:
    All packages built successfully! (All logs)

  • opentelemetry-cpp/1.7.0:
    All packages built successfully! (All logs)

  • opentelemetry-cpp/1.6.1:
    All packages built successfully! (All logs)

  • opentelemetry-cpp/1.4.1:
    All packages built successfully! (All logs)

  • opentelemetry-cpp/1.0.1:
    All packages built successfully! (All logs)

  • opentelemetry-cpp/1.3.0:
    All packages built successfully! (All logs)

  • opentelemetry-cpp/1.8.1:
    All packages built successfully! (All logs)

  • opentelemetry-cpp/1.4.0:
    All packages built successfully! (All logs)


Conan v2 pipeline ❌

Regression: Conan v2 builds are mandatory and they are required for the PR to be merged, because this recipe worked with Conan v2 previously.

The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping @conan-io/barbarians on the PR and we will help you.

See details:

Failure in build 1 (a29e07940aa3ed676d1c8b2df5f52b6dcf29502c):

  • opentelemetry-cpp/1.7.0:
    Didn't run or was cancelled before finishing

  • opentelemetry-cpp/1.3.0:
    CI failed to create some packages (All logs)

    Logs for packageID e457f44b633d2896c45adf5f0a633873a3e1d179:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.cppstd=17
    compiler.libcxx=libstdc++11
    compiler.version=11
    os=Linux
    [options]
    */*:shared=False
    
    [...]
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry//ext/http/client/nosend/http_client_nosend.h
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry//ext/http/client/http_client.h
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry//ext/http/client/curl
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry//ext/http/client/curl/http_client_curl.h
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry//ext/http/client/curl/http_operation_curl.h
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry//ext/http/client/http_client_factory.h
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry//ext/http/common
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry//ext/http/common/url_parser.h
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/lib/libopentelemetry_http_client_curl.a
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/lib/libopentelemetry_otlp_recordable.a
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/lib/libopentelemetry_exporter_otlp_grpc.a
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/lib/libopentelemetry_exporter_otlp_grpc_log.a
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/lib/libopentelemetry_exporter_otlp_http_client.a
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/lib/libopentelemetry_exporter_otlp_http.a
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry/exporters//otlp
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry/exporters//otlp/protobuf_include_prefix.h
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry/exporters//otlp/otlp_environment.h
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry/exporters//otlp/otlp_http_log_exporter.h
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry/exporters//otlp/otlp_log_recordable.h
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry/exporters//otlp/otlp_http_exporter.h
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry/exporters//otlp/otlp_grpc_exporter_options.h
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry/exporters//otlp/otlp_grpc_log_exporter.h
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry/exporters//otlp/otlp_grpc_exporter.h
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry/exporters//otlp/otlp_http_client.h
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry/exporters//otlp/otlp_recordable_utils.h
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry/exporters//otlp/protobuf_include_suffix.h
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/lib/libopentelemetry_exporter_ostream_span.a
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry/exporters//ostream
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry/exporters//ostream/metric_exporter.h
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry/exporters//ostream/log_exporter.h
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry/exporters//ostream/span_exporter.h
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry/exporters//memory
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry/exporters//memory/in_memory_span_data.h
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry/exporters//memory/in_memory_span_exporter.h
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/lib/libopentelemetry_exporter_zipkin_trace.a
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry/exporters//zipkin
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry/exporters//zipkin/zipkin_exporter.h
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/lib/libopentelemetry_exporter_jaeger_trace.a
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry/exporters//jaeger
    -- Installing: /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p/include/opentelemetry/exporters//jaeger/jaeger_exporter.h
    
    opentelemetry-cpp/1.3.0: package(): Packaged 1 file: LICENSE
    opentelemetry-cpp/1.3.0: package(): Packaged 15 '.a' files
    opentelemetry-cpp/1.3.0: package(): Packaged 1 '.cmake' file: conan-official-opentelemetry-cpp-variables.cmake
    opentelemetry-cpp/1.3.0: package(): Packaged 282 '.h' files
    opentelemetry-cpp/1.3.0: Created package revision f17b0766d8bdc0fb04376e813a60f0d8
    opentelemetry-cpp/1.3.0: Package 'e457f44b633d2896c45adf5f0a633873a3e1d179' created
    opentelemetry-cpp/1.3.0: Full package reference: opentelemetry-cpp/1.3.0#85d8647b6d1fabf31d639c6fec641bc7:e457f44b633d2896c45adf5f0a633873a3e1d179#f17b0766d8bdc0fb04376e813a60f0d8
    opentelemetry-cpp/1.3.0: Package folder /home/conan/w/prod-v2/bsr/7179/aecee/p/b/opent9472c43d66230/p
    ERROR: opentelemetry-cpp/1.3.0: required component package 'opentelemetry-proto::' not in dependencies
    
  • opentelemetry-cpp/1.2.0:
    Didn't run or was cancelled before finishing

  • opentelemetry-cpp/1.0.1:
    Didn't run or was cancelled before finishing

  • opentelemetry-cpp/1.4.1:
    Didn't run or was cancelled before finishing

  • opentelemetry-cpp/1.6.1:
    Didn't run or was cancelled before finishing

  • opentelemetry-cpp/1.9.1:
    Didn't run or was cancelled before finishing

  • opentelemetry-cpp/1.8.1:
    Didn't run or was cancelled before finishing

  • opentelemetry-cpp/1.4.0:
    Didn't run or was cancelled before finishing


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants