-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add instrumentation for httpd - Apache HTTP Server (#7)
- Loading branch information
1 parent
b52ae32
commit 63b9213
Showing
36 changed files
with
2,103 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.7.2 |
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,58 @@ | ||
# See Clang docs: http://clang.llvm.org/docs/ClangFormatStyleOptions.html | ||
BasedOnStyle: Chromium | ||
|
||
# Allow double brackets such as std::vector<std::vector<int>>. | ||
Standard: Cpp11 | ||
|
||
# Indent 2 spaces at a time. | ||
IndentWidth: 2 | ||
|
||
# Keep lines under 100 columns long. | ||
ColumnLimit: 100 | ||
|
||
# Always break before braces | ||
BreakBeforeBraces: Custom | ||
BraceWrapping: | ||
# TODO(lujc) wait for clang-format-9 support in Chromium tools | ||
# AfterCaseLabel: true | ||
AfterClass: true | ||
AfterControlStatement: true | ||
AfterEnum: true | ||
AfterFunction: true | ||
AfterNamespace: true | ||
AfterStruct: true | ||
AfterUnion: true | ||
BeforeCatch: true | ||
BeforeElse: true | ||
IndentBraces: false | ||
SplitEmptyFunction: false | ||
SplitEmptyRecord: false | ||
SplitEmptyNamespace: false | ||
|
||
# Keeps extern "C" blocks unindented. | ||
AfterExternBlock: false | ||
|
||
# Indent case labels. | ||
IndentCaseLabels: true | ||
|
||
# Right-align pointers and references | ||
PointerAlignment: Right | ||
|
||
# ANGLE likes to align things as much as possible. | ||
AlignOperands: true | ||
AlignConsecutiveAssignments: true | ||
|
||
# Use 2 space negative offset for access modifiers | ||
AccessModifierOffset: -2 | ||
|
||
# TODO(jmadill): Decide if we want this on. Doesn't have an "all or none" mode. | ||
AllowShortCaseLabelsOnASingleLine: false | ||
|
||
# Useful for spacing out functions in classes | ||
KeepEmptyLinesAtTheStartOfBlocks: true | ||
|
||
# Indent nested PP directives. | ||
IndentPPDirectives: AfterHash | ||
|
||
# Include blocks style | ||
IncludeBlocks: Preserve |
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,64 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
name: Build module | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
- name: Setup buildtools | ||
run: | | ||
sudo ./setup-buildtools.sh | ||
sudo ./setup_environment.sh | ||
- name: Compile | ||
run: ./build.sh | ||
|
||
clang_format: | ||
name: Check code formatting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
- name: Setup formatting tool (clang) | ||
run: | | ||
sudo ./tools/setup-tools.sh code | ||
- name: Check formatting | ||
run: ./tools/format-code.sh | ||
|
||
build_format: | ||
name: Check build formatting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
- name: Setup formatting tool (buildifier) | ||
run: | | ||
sudo ./tools/setup-tools.sh buildifier | ||
- name: Check formatting | ||
run: ./tools/format-bazel.sh | ||
|
||
e2e_tests: | ||
name: Run end-to-end tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
- name: Setup buildtools | ||
run: | | ||
sudo ./tests/setup-tools.sh | ||
sudo ./setup-buildtools.sh | ||
sudo ./setup_environment.sh | ||
- name: Compile | ||
run: ./build.sh | ||
- name: Run tests | ||
run: | | ||
./create-otel-load.sh | ||
sudo ./httpd_install_otel.sh | ||
cd tests && sudo ./run-all.sh |
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,45 @@ | ||
# Ref. https://github.com/github/gitignore/blob/master/C%2B%2B.gitignore | ||
# Prerequisites | ||
*.d | ||
|
||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.obj | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Compiled Dynamic libraries | ||
*.so | ||
*.dylib | ||
*.dll | ||
|
||
# Fortran module files | ||
*.mod | ||
*.smod | ||
|
||
# Compiled Static libraries | ||
*.lai | ||
*.la | ||
*.a | ||
*.lib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
|
||
# Bazel files | ||
/bazel-* | ||
|
||
# Mac | ||
.DS_Store | ||
|
||
# Output directories | ||
/out | ||
/out.* | ||
# Indicator that the tools were deployed | ||
.buildtools |
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,11 @@ | ||
load("@rules_cc//cc:defs.bzl", "cc_binary") | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
cc_binary( | ||
name = "otel.so", | ||
linkshared = 1, | ||
deps = [ | ||
"//src/otel:otelmodlib", | ||
], | ||
) |
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,38 @@ | ||
FROM ubuntu:18.04 | ||
|
||
######################################### | ||
# copy setup stuff from opentelemetry-cpp | ||
######################################### | ||
|
||
WORKDIR /setup-ci | ||
|
||
ADD setup-buildtools.sh /setup-ci/setup-buildtools.sh | ||
|
||
RUN /setup-ci/setup-buildtools.sh | ||
|
||
######################### | ||
# now build plugin itself | ||
######################### | ||
|
||
ADD setup_environment.sh /setup/setup_environment.sh | ||
|
||
RUN /setup/setup_environment.sh | ||
|
||
COPY src /root/src | ||
COPY .clang-format /root | ||
COPY tools /root/tools | ||
|
||
COPY .bazelversion /root | ||
COPY BUILD /root | ||
COPY WORKSPACE /root | ||
|
||
WORKDIR /root | ||
COPY create-otel-load.sh /root | ||
COPY build.sh /root | ||
COPY opentelemetry.conf /root | ||
COPY httpd_install_otel.sh /root | ||
RUN /root/build.sh | ||
|
||
# TODO: check apache configuration (apachectl configtest) | ||
|
||
# TODO: run tests? |
Oops, something went wrong.