-
Notifications
You must be signed in to change notification settings - Fork 332
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
otel: add build tooling to include otel code
Adds the --otel flag to the configure command and the various build time variables and checks that are needed in this flow. It also includes the nxt_otel.c and nxt_otel.h files that are needed for the rest of Unit to talk to the compiled static library that's generated from the rust crate. Signed-off-by: Ava Hahn <[email protected]> Signed-off-by: Gabor Javorszky <[email protected]> Co-authored-by: Ava Hahn <[email protected]>
- Loading branch information
Showing
12 changed files
with
577 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
# Copyright (C) NGINX, Inc. | ||
|
||
if [ $NXT_DEBUG = YES ]; then | ||
NXT_OTEL_LIB_DIR=src/otel/ | ||
NXT_OTEL_LIB_LOC=src/otel/target/debug/libotel.a | ||
NXT_OTEL_BUILD_FLAG="" | ||
else | ||
NXT_OTEL_LIB_DIR=src/otel/ | ||
NXT_OTEL_LIB_LOC=src/otel/target/release/libotel.a | ||
NXT_OTEL_BUILD_FLAG="--release" | ||
fi | ||
|
||
if [ $NXT_OTEL ]; then | ||
NXT_OTEL_LIBS="-lssl -lcrypto" | ||
if [ $(which pkgconf) ]; then | ||
NXT_OTEL_LIBS="$(pkgconf openssl --cflags --libs)" | ||
elif [ $(which pkg-config) ]; then | ||
NXT_OTEL_LIBS="$(pkg-config openssl --cflags --libs)" | ||
fi | ||
NXT_LIB_AUX_LIBS="$NXT_LIB_AUX_LIBS $NXT_OTEL_LIBS" | ||
cat << END >> $NXT_AUTO_CONFIG_H | ||
#ifndef NXT_HAVE_OTEL | ||
#define NXT_HAVE_OTEL 1 | ||
#endif | ||
END | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.