Skip to content

feat(transport): add SENTRY_LINK_CURL option - #1954

Open
jpnurmi wants to merge 11 commits into
masterfrom
jpnurmi/feat/curl-link-option
Open

feat(transport): add SENTRY_LINK_CURL option#1954
jpnurmi wants to merge 11 commits into
masterfrom
jpnurmi/feat/curl-link-option

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Add SENTRY_LINK_CURL CMake option (inspired by SENTRY_LINK_PTHREAD) to choose whether the curl transport links libcurl directly or resolves it at runtime with dlopen/dlsym. Keep direct linking enabled by default.

The linked and runtime-loaded paths use the same curl call table, so the request logic remains shared.

If the runtime dependency is not satisfied:

[sentry] WARN failed to load libcurl.so.4: libcurl.so.4: cannot open shared object file: No such file or directory
[sentry] WARN failed to initialize transport
[sentry] WARN `sentry_init` failed

See:

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 2117505

Comment thread CHANGELOG.md Outdated
@jpnurmi
jpnurmi force-pushed the jpnurmi/feat/curl-link-option branch from 3cac460 to 36eed70 Compare August 4, 2026 19:39
Comment thread src/transports/sentry_http_transport_curl.c Outdated
@jpnurmi
jpnurmi force-pushed the jpnurmi/feat/curl-link-option branch from 36eed70 to 4ff5953 Compare August 4, 2026 19:50
Add SENTRY_LINK_CURL to choose whether the curl transport links libcurl
directly, resolves it at runtime with dlopen/dlsym, or uses the default
behavior. Keep the default behavior on direct linking in this change.

The linked and runtime-loaded paths use the same curl call table, so the
request logic remains shared.

See: #1852
@jpnurmi
jpnurmi force-pushed the jpnurmi/feat/curl-link-option branch from 4ff5953 to 227693c Compare August 4, 2026 19:53
Comment thread CMakeLists.txt
@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 79.76190% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.98%. Comparing base (f2f784c) to head (2117505).
⚠️ Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1954      +/-   ##
==========================================
+ Coverage   75.93%   75.98%   +0.04%     
==========================================
  Files          94       94              
  Lines       22161    22180      +19     
  Branches     3936     3937       +1     
==========================================
+ Hits        16829    16854      +25     
+ Misses       4445     4440       -5     
+ Partials      887      886       -1     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/transports/sentry_http_transport_curl.c Outdated

@limbonaut limbonaut left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Partially reviewed, I'll give it another look in a bit!

Comment thread README.md Outdated
Comment thread src/transports/sentry_http_transport_curl.c Outdated
Comment thread src/transports/sentry_http_transport_curl.c Outdated
Comment thread src/transports/sentry_http_transport_curl.c Outdated
Comment thread src/transports/sentry_http_transport_curl.c
Comment thread src/transports/sentry_http_transport_curl.c

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9413592. Configure here.

Comment thread src/transports/sentry_http_transport_curl.c
This reverts commit cb49750.

@limbonaut limbonaut left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good!

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.

2 participants