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 module build #8585

Merged
merged 2 commits into from
May 14, 2022
Merged

Conversation

esigo
Copy link
Member

@esigo esigo commented May 14, 2022

What this PR does / why we need it:

This PR Fixes #8437 by installing gRPC and OpenTelemetry-cpp using a pattern similar to open-telemetry/opentelemetry-cpp#1382
The final image size is 48.9MB.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation only

Which issue/s this PR fixes

fixes #8437

How Has This Been Tested?

ldd otel_ngx_module.so 
        /lib/ld-musl-x86_64.so.1 (0x7fbfeb61f000)
        libopentelemetry_exporter_otlp_grpc.so => /usr/lib/libopentelemetry_exporter_otlp_grpc.so (0x7fbfeb557000)
        libprotobuf.so.3.18.1.0 => /usr/lib/libprotobuf.so.3.18.1.0 (0x7fbfeb25d000)
        libopentelemetry_trace.so => /usr/lib/libopentelemetry_trace.so (0x7fbfeb231000)
        libopentelemetry_resources.so => /usr/lib/libopentelemetry_resources.so (0x7fbfeb21e000)
        libabsl_bad_variant_access.so.2111.0.0 => /usr/lib/libabsl_bad_variant_access.so.2111.0.0 (0x7fbfeb219000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x7fbfeb078000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7fbfeb05e000)
        libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7fbfeb61f000)
        libopentelemetry_otlp_recordable.so => /usr/lib/libopentelemetry_otlp_recordable.so (0x7fbfeb028000)
        libgrpc++.so.1.43 => /usr/lib/libgrpc++.so.1.43 (0x7fbfeaf59000)
        libabsl_synchronization.so.2111.0.0 => /usr/lib/libabsl_synchronization.so.2111.0.0 (0x7fbfeaf49000)
        libopentelemetry_common.so => /usr/lib/libopentelemetry_common.so (0x7fbfeaf44000)
        libgrpc.so.21 => /usr/lib/libgrpc.so.21 (0x7fbfeaa3d000)
        libabsl_raw_hash_set.so.2111.0.0 => /usr/lib/libabsl_raw_hash_set.so.2111.0.0 (0x7fbfeaa38000)
        libabsl_hash.so.2111.0.0 => /usr/lib/libabsl_hash.so.2111.0.0 (0x7fbfeaa33000)
        libabsl_statusor.so.2111.0.0 => /usr/lib/libabsl_statusor.so.2111.0.0 (0x7fbfeaa2d000)
        libgpr.so.21 => /usr/lib/libgpr.so.21 (0x7fbfeaa13000)
        libupb.so.21 => /usr/lib/libupb.so.21 (0x7fbfea9f2000)
        libabsl_status.so.2111.0.0 => /usr/lib/libabsl_status.so.2111.0.0 (0x7fbfea9e8000)
        libabsl_time.so.2111.0.0 => /usr/lib/libabsl_time.so.2111.0.0 (0x7fbfea9d1000)
        libabsl_strings.so.2111.0.0 => /usr/lib/libabsl_strings.so.2111.0.0 (0x7fbfea9b1000)
        libabsl_stacktrace.so.2111.0.0 => /usr/lib/libabsl_stacktrace.so.2111.0.0 (0x7fbfea9ac000)
        libabsl_symbolize.so.2111.0.0 => /usr/lib/libabsl_symbolize.so.2111.0.0 (0x7fbfea9a7000)
        libabsl_malloc_internal.so.2111.0.0 => /usr/lib/libabsl_malloc_internal.so.2111.0.0 (0x7fbfea9a1000)
        libabsl_base.so.2111.0.0 => /usr/lib/libabsl_base.so.2111.0.0 (0x7fbfea99b000)
        libabsl_spinlock_wait.so.2111.0.0 => /usr/lib/libabsl_spinlock_wait.so.2111.0.0 (0x7fbfea996000)
        libabsl_raw_logging_internal.so.2111.0.0 => /usr/lib/libabsl_raw_logging_internal.so.2111.0.0 (0x7fbfea991000)
        libre2.so.9 => /usr/lib/libre2.so.9 (0x7fbfea90c000)
        libssl.so.1.1 => /lib/libssl.so.1.1 (0x7fbfea88b000)
        libcrypto.so.1.1 => /lib/libcrypto.so.1.1 (0x7fbfea60a000)
        libaddress_sorting.so.21 => /usr/lib/libaddress_sorting.so.21 (0x7fbfea605000)
        libabsl_cord.so.2111.0.0 => /usr/lib/libabsl_cord.so.2111.0.0 (0x7fbfea5ed000)
        libabsl_bad_optional_access.so.2111.0.0 => /usr/lib/libabsl_bad_optional_access.so.2111.0.0 (0x7fbfea5e8000)
        libabsl_str_format_internal.so.2111.0.0 => /usr/lib/libabsl_str_format_internal.so.2111.0.0 (0x7fbfea5cc000)
        libabsl_throw_delegate.so.2111.0.0 => /usr/lib/libabsl_throw_delegate.so.2111.0.0 (0x7fbfea5c5000)
        libabsl_time_zone.so.2111.0.0 => /usr/lib/libabsl_time_zone.so.2111.0.0 (0x7fbfea5a6000)
        libabsl_city.so.2111.0.0 => /usr/lib/libabsl_city.so.2111.0.0 (0x7fbfea5a0000)
        libabsl_low_level_hash.so.2111.0.0 => /usr/lib/libabsl_low_level_hash.so.2111.0.0 (0x7fbfea59b000)
        libabsl_cordz_info.so.2111.0.0 => /usr/lib/libabsl_cordz_info.so.2111.0.0 (0x7fbfea593000)
        libabsl_int128.so.2111.0.0 => /usr/lib/libabsl_int128.so.2111.0.0 (0x7fbfea58b000)
        libabsl_strings_internal.so.2111.0.0 => /usr/lib/libabsl_strings_internal.so.2111.0.0 (0x7fbfea585000)
        libabsl_debugging_internal.so.2111.0.0 => /usr/lib/libabsl_debugging_internal.so.2111.0.0 (0x7fbfea57e000)
        libabsl_cord_internal.so.2111.0.0 => /usr/lib/libabsl_cord_internal.so.2111.0.0 (0x7fbfea565000)
        libabsl_cordz_functions.so.2111.0.0 => /usr/lib/libabsl_cordz_functions.so.2111.0.0 (0x7fbfea560000)
        libabsl_cordz_handle.so.2111.0.0 => /usr/lib/libabsl_cordz_handle.so.2111.0.0 (0x7fbfea55a000)
        libabsl_exponential_biased.so.2111.0.0 => /usr/lib/libabsl_exponential_biased.so.2111.0.0 (0x7fbfea555000)
Error relocating otel_ngx_module.so: ngx_http_get_indexed_variable: symbol not found
Error relocating otel_ngx_module.so: ngx_http_script_compile: symbol not found
Error relocating otel_ngx_module.so: ngx_palloc: symbol not found
Error relocating otel_ngx_module.so: ngx_pool_cleanup_add: symbol not found
Error relocating otel_ngx_module.so: ngx_regex_compile: symbol not found
Error relocating otel_ngx_module.so: ngx_http_add_variable: symbol not found
Error relocating otel_ngx_module.so: ngx_pcalloc: symbol not found
Error relocating otel_ngx_module.so: pcre_exec: symbol not found
Error relocating otel_ngx_module.so: ngx_array_create: symbol not found
Error relocating otel_ngx_module.so: ngx_http_script_run: symbol not found
Error relocating otel_ngx_module.so: ngx_http_script_variables_count: symbol not found
Error relocating otel_ngx_module.so: ngx_strncasecmp: symbol not found
Error relocating otel_ngx_module.so: ngx_atoi: symbol not found
Error relocating otel_ngx_module.so: ngx_array_push: symbol not found
Error relocating otel_ngx_module.so: ngx_conf_log_error: symbol not found
Error relocating otel_ngx_module.so: ngx_http_get_variable_index: symbol not found
Error relocating otel_ngx_module.so: ngx_log_error_core: symbol not found
Error relocating otel_ngx_module.so: ngx_http_core_module: symbol not found
Error relocating otel_ngx_module.so: ngx_http_module: symbol not found
Error relocating otel_ngx_module.so: ngx_conf_set_flag_slot: symbol not found
Error relocating otel_ngx_module.so: ngx_conf_set_flag_slot: symbol not found
Error relocating otel_ngx_module.so: ngx_conf_set_flag_slot: symbol not found

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 14, 2022
@k8s-ci-robot
Copy link
Contributor

@esigo: This issue is currently awaiting triage.

If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label May 14, 2022
@k8s-ci-robot
Copy link
Contributor

Welcome @esigo!

It looks like this is your first PR to kubernetes/ingress-nginx 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/ingress-nginx has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @esigo. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 14, 2022
@longwuyuan
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 14, 2022
@longwuyuan
Copy link
Contributor

Much much gratitude for this @esigo . Helps this project a lot

@rikatz
Copy link
Contributor

rikatz commented May 14, 2022

/assign

Looks good to me, @longwuyuan wdyt? If tested and works fine we can approve it :D

@longwuyuan
Copy link
Contributor

@rikatz :-) this is 100% good to merge. FYI, there is history here. I created a issue in the Opentelemetry project open-telemetry/opentelemetry-cpp-contrib#141 and @esigo is a maintainer at OT is actually going above and beyond to help solve the confusing problem we are having with running OT module in sidecar.

Thanks tons @esigo

@esigo
Copy link
Member Author

esigo commented May 14, 2022

@longwuyuan I'm a big fan of K8s projects, happy to help :)

@rikatz
Copy link
Contributor

rikatz commented May 14, 2022

/lgtm
/approve

Thank you both for this :)

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 14, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: esigo, rikatz

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 14, 2022
@k8s-ci-robot k8s-ci-robot merged commit 24925cc into kubernetes:main May 14, 2022
@esigo esigo deleted the opentelemetry-build branch May 14, 2022 13:52
@mahaisong
Copy link

@esigo You're great. If images works normally in the VM, can you push your docker image to the hub and provide it to me for download and test? thank

@esigo
Copy link
Member Author

esigo commented May 15, 2022

It seems I have used the wrong sha256 in this PR. I have to raise another one to fix the hash.

@longwuyuan
Copy link
Contributor

@esigo , Please go ahead. Will wait for she fix.
@rikatz , this merge should have fired a cloud build for new OT image. But there is no new OT image even after 24 hours. Did I assume wrong.

@esigo esigo mentioned this pull request May 15, 2022
9 tasks
@esigo esigo mentioned this pull request Sep 3, 2022
rchshld pushed a commit to joomcode/ingress-nginx that referenced this pull request May 19, 2023
* nginx opentelemetry modules

* revert sha check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

An error occurred between opentelemetry modules
5 participants