Ava Hahn
c8c176ba23
Merge 35d342a9cd into 22d6380458
2025-05-21 16:08:43 -07:00
Ava Hahn
35d342a9cd
Additional testing for upstream spans
...
This commit adds some loose testing for the functionality included
in the previous commit. A new test is minted that verifies the type,
quantity, and return code of client and server spans after a request
that leverages an upstream.
Signed-off-by: Ava Hahn <a.hahn@f5.com>
2025-05-21 15:59:22 -07:00
Ava Hahn
111f621e63
Configurable span generation for upstream calls ( fix : #17 )
...
This commit adds support to configure client span generation for
upstream requests. Client span generation can be configured per
upstream using a configuration snippet like the one below:
upstream echo.sunnypup.io {
otel_upstream_span_enable;
server echo.sunnypup.io:443;
}
The primary vehicle for this is the load balancer API. Existing
load balancer callbacks and data are stored in a new context type.
New callbacks are added for getting, freeing requests as well as
setting and saving ssl sessions. These modifications are made if
and only if the otel_upstream_span_enable configuration directive
is made (per upstream).
In addition to the above, A new enumeration is made in the batch
exporter for span type. Currently Client and Server are recognized,
however this can be extended as needed in the future. This enum is
matched with corresponding elements in the underlying opentelemetry
library.
The logic path between getOtelCtx/ensureOtelCtx/onRequestStart is
modified to make sure that even upstream calls made by subrequests
have the correct metadata needed for proper span propagation.
Additionally, some logic is refactored out of onRequestEnd for
reuse in the upstream span generation.
Finally, a new routine is added to set client span specific attrs.
Note: these changes do require that NGINX is compiled with SSL
support. This is needed because use of the load balancer API,
specifically wrapping around the data argument to callbacks, must
be handled properly when setting SSL sessions or else a memory
corruption error can be triggered by the round robin SSL handlers
recieving bad data.
Signed-off-by: Ava Hahn <a.hahn@f5.com>
2025-05-02 13:36:58 -07:00
Pavel Pautov
22d6380458
Add CI workflow for Alpine Linux.
...
The workflow uses Nginx build system with OS provided gRPC.
2025-03-31 21:02:28 -07:00
Pavel Pautov
72d8eed53a
Fix build against Nginx 1.22 ( fix #85 ).
Ubuntu build / build-module (push) Has been cancelled
2025-01-22 13:05:02 -08:00
Eugene Grebenschikov
f578402f19
Verify export via TLS ( #12 ).
...
Co-authored-by: Pavel Pautov <p.pautov@f5.com>
2024-12-20 17:40:47 -08:00
Pavel Pautov
9dc4dc2803
Verify custom exporter headers support ( #62 ).
2024-12-20 14:53:37 -08:00
Pavel Pautov
a45a594801
Support sending custom headers to export endpoint ( fix #62 ).
...
The headers are configured by "header" directive in "otel_exporter" block, e.g.
otel_exporter {
endpoint localhost:4317;
header X-API-Token "token value";
}
2024-12-20 14:53:37 -08:00
Pavel Pautov
88a64bb2c3
Consolidate transport related parameters into a struct.
...
Also, replace leftover cast with getMainConf().
2024-12-20 14:53:37 -08:00
Pavel Pautov
f633a8eef2
Fail early if "trusted_certificate" is a directory.
...
Previously, the error was caused by enormous std::string allocation.
2024-12-20 14:53:37 -08:00
Eugene
c9136f2ec8
Verify custom resource attributes support ( #32 ).
...
Co-authored-by: p-pautov <37922380+p-pautov@users.noreply.github.com>
2024-12-19 17:53:38 -08:00
Eugene Grebenschikov
1d25954274
Download the latest otelcol for CI tests.
...
Co-authored-by: Pavel Pautov <p.pautov@f5.com>
2024-12-18 17:45:50 -08:00
Eugene Grebenschikov
be30eeffc1
Verify HTTP scheme support in endpoint ( #60 ).
2024-12-18 17:06:21 -08:00
Eugene Grebenschikov
1e183a3fa9
Use pytest for tests.
2024-12-17 22:27:27 -08:00
Nikita Vakula
6c1659a20b
Support export via TLS ( fix #12 ).
2024-11-21 11:06:40 -08:00
Pavel Pautov
da2e4eb11b
Trigger CI build on pull requests.
...
Also, use default 'run-name' for more informative message.
2024-11-19 15:49:54 -08:00
Pavel Pautov
f45b618931
Rename CI workflow file to 'ubuntu.yml'.
2024-11-19 15:49:54 -08:00
Pavel Pautov
668077dbf7
Allow HTTP scheme in endpoint ( fix #60 ).
2024-11-13 13:55:04 -08:00
Pavel Pautov
b5c8cd8de3
Support custom resource attributes ( fix #32 ).
...
Now attributes can be set with "otel_resource_attr" directive, e.g.
otel_resource_attr my.name "my value";
2024-11-12 19:06:46 -08:00
Eugene Grebenschikov
1074d02758
Use github repos for nginx and nginx-tests.
2024-10-04 13:26:51 -07:00
Pavel Pautov
4c841c1c55
Use Abseil logging for gRPC v1.65.0 and above.
...
Original logging method is now deprecated and results in error message
on Nginx startup.
2024-07-23 09:22:48 -07:00
Pavel Pautov
4c24716eef
Don't force C++ standard for user builds.
...
This fixes build against C++17 enabled prebuilt dependencies.
2024-07-23 09:22:48 -07:00
Pavel Pautov
10215eee1b
Support building with latest gRPC versions (up to v1.65.0).
2024-07-23 09:22:48 -07:00
Pavel Pautov
6ed3910afb
Support custom versions of auto-fetched build dependencies.
2024-07-23 09:22:48 -07:00
Pavel Pautov
01a40c271e
Unify CMake and Nginx build system defaults.
...
Provide generic environment variable to adjust CMake settings from Nginx
build system.
2024-07-23 09:22:48 -07:00
Dmitry Plotnikov
d381713639
Fix undefined symbols error on Mac ( fix #38 ).
2024-03-13 12:23:52 -07:00
Pavel Pautov
30b9b73546
Disable unnecessary gRPC features to reduce binary size.
...
Incidentally, this also removes RE2 code from the binary.
2024-03-12 14:43:02 -07:00
Dmitry Plotnikov
5a0071f497
Enforce compiler warnings in CI build only.
2024-03-08 21:40:50 -08:00
Dmitry Plotnikov
d6d7ce1015
Bump gRPC to v1.49.4 to support building with GCC 13 ( fix #13 ).
2024-03-08 21:40:50 -08:00
Dmitry Plotnikov
fa28f37dab
Stop using system provided RE2 for static build.
...
Starting with 2023-06-01 RE2 publicly depends on Abseil, so we can't use
system provided RE2 together with gRPC-bundled Abseil.
2024-03-08 21:40:50 -08:00
Dmitry Plotnikov
93dc2b1878
Use Abseil logging for Protobuf v22 and above ( fix #16 ).
2024-02-29 16:09:15 -08:00
Dmitry Plotnikov
b54c65005a
Move gRPC/Protobuf logs handling to a dedicated file.
2024-02-29 16:09:15 -08:00
Pavel Pautov
aac5678def
Update PR template.
...
Removed documentation task, as most of it is hosted externally for now.
2024-02-06 22:12:26 -08:00
Pavel Pautov
c8c71688cf
Update commit message guidelines.
2024-02-06 22:12:26 -08:00
Pavel Pautov
7edca7a3ec
Removed NOTICE, it's covered by README.md and LICENSE already.
2024-02-06 22:12:26 -08:00
Dmitry Plotnikov
fa280e1ffe
Bump gRPC and opentelemetry-cpp versions.
...
Move on to gRPC v1.46.7 and opetelemtry-cpp v1.11.0, last versions that
support C++11.
2024-02-06 17:22:48 -08:00
Eugene Grebenschikov
0491cc05ee
Add manual run of actions.
2024-02-06 10:59:40 -08:00
Evgeny
1971b4f17f
Bumps actions/download-artifact and actions/upload-artifact from 3 to 4.
2023-12-26 12:14:30 -08:00
dependabot[bot]
1a43ddc6f1
Bump actions/checkout from 3 to 4
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v3...v4 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-12-12 16:08:38 -08:00
Pavel Pautov
958a4b6962
Prevent crash for HTTP/0.9 requests ( fix #22 ).
2023-12-08 11:46:28 -08:00
Michael Vernik
fc7e69a0a7
Updated README: Added steps for installation from packages. ( #19 )
2023-11-07 15:37:30 -08:00
Nina Forsyth
9f359ff0eb
Update README.md ( #14 )
...
Updating two items
2023-10-24 13:08:59 -07:00
Michael Vernik
f6d041fbf2
add otel_exporter directive to simple tracing example in readme ( #15 )
2023-10-24 13:04:59 -07:00
Michael Vernik
0da0f1537e
Updated README: Clarified dynamic control. Added link to Github repo.
2023-09-01 13:00:56 -07:00
Michael Vernik
98fb4d1d21
Added to intro, more context/details to building/installation. Remove… ( #7 )
...
Updated README with more detailed instructions on building, installing, running and testing
2023-08-31 22:32:56 -07:00
dplotnikov-f5
c732ff5fd1
Added docs. ( #6 )
...
Added docs.
2023-08-21 13:51:06 -07:00
Evgeny
3d528bb093
add: functional tests ( #5 )
...
* add functional tests
2023-08-16 17:20:25 -07:00
Evgeny
f6f2525dd7
fix: building with nginx with HTTP/3 ( #4 )
2023-06-14 09:58:46 -07:00
Dmitry Plotnikov
470e4a2906
Do not require otel_exporter directive.
2023-06-13 16:59:02 -07:00
Dmitry Plotnikov
387d391823
Fix a crash for configs with no http block.
2023-06-13 16:59:02 -07:00