@@ -86,11 +86,6 @@ index 0bbf67f3..7362473f 100644
8686 vcpkg=2024.02.14
8787```
8888
89- #### file bazel/repository.bzl
90-
91- Please follow the guide [ Upgrade a bazel dependency] ( #upgrade-a-bazel-dependency )
92- for more details.
93-
9489#### file cmake/opentelemetry-proto.cmake
9590
9691Update the tag in the CMake logic:
@@ -141,16 +136,6 @@ In this case, it is better to:
141136When the C++ code requires a newer minimum version of opentelemetry-proto,
142137make sure to document this, including in the release notes.
143138
144- ### Known issues (opentelemetry-proto)
145-
146- For bazel, two different methods to build exists.
147-
148- First, the code can build using file ` bazel/repository.bzl ` .
149- This option does not depend on bazel central.
150-
151- Secondly, there is also a build using modules, with file ` MODULE.bazel ` .
152- This option does depend on bazel central, and CI depends on it.
153-
154139## semantic-conventions and weaver
155140
156141### Comments (semantic-conventions)
@@ -378,50 +363,13 @@ index abc1234..def5678 100644
378363+prometheus-cpp=v1.2.4
379364```
380365
381- In file bazel/repository.bzl locate the entry for prometheus-cpp:
382-
383- ``` shell
384- # C++ Prometheus Client library.
385- maybe(
386- http_archive,
387- name = " com_github_jupp0r_prometheus_cpp" ,
388- sha256 = " ac6e958405a29fbbea9db70b00fa3c420e16ad32e1baf941ab233ba031dd72ee" ,
389- strip_prefix = " prometheus-cpp-1.2.3" ,
390- urls = [
391- " https://github.com/jupp0r/prometheus-cpp/archive/refs/tags/v1.2.3.tar.gz" ,
392- ],
393- )
394- ```
395-
396- Update the URL to the new tag:
397-
398- ``` shell
399- urls = [
400- " https://github.com/jupp0r/prometheus-cpp/archive/v1.2.4.tar.gz" ,
401- ],
402- ```
403-
404- Update strip_prefix to match the new version:
405-
406- ``` shell
407- strip_prefix = " prometheus-cpp-1.2.4" ,
408- ```
409-
410- Download the new URL:
411-
412- ``` shell
413- wget https://github.com/jupp0r/prometheus-cpp/archive/v1.2.4.tar.gz
414- ```
415-
416- Calculate the checksum:
366+ In file ` MODULE.bazel ` locate the entry for prometheus-cpp and update it
367+ to the new version:
417368
418- ``` shell
419- sha256sum v1.2.4.tar.gz
420- abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234 v1.2.4.tar.gz
369+ ``` bzl
370+ bazel_dep(name = " prometheus-cpp" , version = " 1.3.0" , repo_name = " com_github_jupp0r_prometheus_cpp" )
421371```
422372
423- Update the ` sha256 ` .
424-
425373## Upgrade a git submodule
426374
427375All the git submodule are under the folder ` third_party ` .
@@ -502,89 +450,7 @@ git add third_party/opentelemetry-proto
502450
503451# # Upgrade a bazel dependency
504452
505- Same as git submodule, we will continue use ` opentelemetry-proto` as example.
506-
507- All the bazel dependencies are defined in [repository.bzl](https://github.com/open-telemetry/opentelemetry-cpp/blob/main/bazel/repository.bzl)
508- and [MODULE.bazel](https://github.com/open-telemetry/opentelemetry-cpp/blob/main/MODULE.bazel).
509-
510- # ## Update the dependency in repository.bzl
511-
512- Locate the entry for opentelemetry-proto:
513-
514- ` ` ` text
515- # OTLP Protocol definition
516- maybe(
517- http_archive,
518- name = " com_github_opentelemetry_proto" ,
519- build_file = " @io_opentelemetry_cpp//bazel:opentelemetry_proto.BUILD" ,
520- sha256 = " bed250ceec8e4a83aa5604d7d5595a61945059dc662edd058a9da082283f7a00" ,
521- strip_prefix = " opentelemetry-proto-1.3.1" ,
522- urls = [
523- " https://github.com/open-telemetry/opentelemetry-proto/archive/v1.3.1.tar.gz" ,
524- ],
525- )
526- ` ` `
527-
528- Update the URL to the new tag:
529-
530- ` ` ` text
531- urls = [
532- " https://github.com/open-telemetry/opentelemetry-proto/archive/v1.3.2.tar.gz" ,
533- ],
534- ` ` `
535-
536- Update strip_prefix to the new tag:
537-
538- ` ` ` text
539- strip_prefix = " opentelemetry-proto-1.3.2" ,
540- ` ` `
541-
542- Download the new URL:
543-
544- ` ` ` shell
545- wget https://github.com/open-telemetry/opentelemetry-proto/archive/v1.3.2.tar.gz
546- ` ` `
547-
548- Run a checksum on the new file:
549-
550- ` ` ` shell
551- sha256sum v1.3.2.tar.gz
552- ` ` `
553-
554- ` ` ` shell
555- c069c0d96137cf005d34411fa67dd3b6f1f8c64af1e7fb2fe0089a41c425acd7 v1.3.2.tar.gz
556- ` ` `
557-
558- Update the checksum in file bazel/repository.bzl:
559-
560- ` ` ` text
561- sha256 = " c069c0d96137cf005d34411fa67dd3b6f1f8c64af1e7fb2fe0089a41c425acd7" ,
562- ` ` `
563-
564- Typical change:
565-
566- ` ` ` shell
567- [malff@malff-desktop opentelemetry-cpp]$ git diff bazel/repository.bzl
568- diff --git a/bazel/repository.bzl b/bazel/repository.bzl
569- index bac1e45b..508b95a3 100644
570- --- a/bazel/repository.bzl
571- +++ b/bazel/repository.bzl
572- @@ -88,10 +88,10 @@ def opentelemetry_cpp_deps ():
573- http_archive,
574- name = " com_github_opentelemetry_proto" ,
575- build_file = " @io_opentelemetry_cpp//bazel:opentelemetry_proto.BUILD" ,
576- - sha256 = " bed250ceec8e4a83aa5604d7d5595a61945059dc662edd058a9da082283f7a00" ,
577- - strip_prefix = " opentelemetry-proto-1.3.1" ,
578- + sha256 = " c069c0d96137cf005d34411fa67dd3b6f1f8c64af1e7fb2fe0089a41c425acd7" ,
579- + strip_prefix = " opentelemetry-proto-1.3.2" ,
580- urls = [
581- - " https://github.com/open-telemetry/opentelemetry-proto/archive/v1.3.1.tar.gz" ,
582- + " https://github.com/open-telemetry/opentelemetry-proto/archive/v1.3.2.tar.gz" ,
583- ],
584- )
585- ` ` `
586-
587- # ### Update MODULE.bazel
453+ # ## Update MODULE.bazel
588454
589455> Remember, the link is different in your case.
590456Replace ` opentelemetry-proto` to correct target.
0 commit comments