-
Notifications
You must be signed in to change notification settings - Fork 451
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
CRD defs for Apache HTTPD Autoinstrumentation #1305
Changes from all commits
0abc701
c3159fa
232aa55
e7f6d15
60fba8f
7d8ac26
7f3355a
87126d4
743cce1
28a5311
6acaa8e
3971eff
9e38814
1108904
96e41e1
812c27c
1e5c14d
a13cdfe
3fa0695
28c0229
9b621e7
0be8dfa
188d382
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' | ||
change_type: enhancement | ||
|
||
# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) | ||
component: operator | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: This PR adds CRD for Apache HTTPD auto-instrumentation | ||
|
||
# One or more tracking issues related to the change | ||
issues: [1305] | ||
|
||
# (Optional) One or more lines of additional information to render under the primary note. | ||
# These lines will be padded with 2 spaces and then inserted directly into the document. | ||
# Use pipe (|) for multiline entries. | ||
subtext: |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,10 @@ type InstrumentationSpec struct { | |
// DotNet defines configuration for DotNet auto-instrumentation. | ||
// +optional | ||
DotNet DotNet `json:"dotnet,omitempty"` | ||
|
||
// Apache defines configuration for Apache HTTPD auto-instrumentation. | ||
// +optional | ||
ApacheHttpd ApacheHttpd `json:"apacheHttpd,omitempty"` | ||
} | ||
|
||
// Resource defines the configuration for the resource attributes, as defined by the OpenTelemetry specification. | ||
|
@@ -145,6 +149,33 @@ type DotNet struct { | |
Env []corev1.EnvVar `json:"env,omitempty"` | ||
} | ||
|
||
type ApacheHttpd struct { | ||
// Image is a container image with Apache SDK and auto-instrumentation. | ||
// +optional | ||
Image string `json:"image,omitempty"` | ||
|
||
// Env defines Apache HTTPD specific env vars. There are four layers for env vars' definitions and | ||
// the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. | ||
// If the former var had been defined, then the other vars would be ignored. | ||
// +optional | ||
Env []corev1.EnvVar `json:"env,omitempty"` | ||
|
||
// Attrs defines Apache HTTPD agent specific attributes. The precedence is: | ||
// `agent default attributes` > `instrument spec attributes` . | ||
// Attributes are documented at https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/otel-webserver-module | ||
// +optional | ||
Attrs []corev1.EnvVar `json:"attrs,omitempty"` | ||
|
||
// Apache HTTPD server version. One of 2.4 or 2.2. Default is 2.4 | ||
// +optional | ||
Version string `json:"version,omitempty"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for my curiosity how is this version used? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Apache HTTPD used these days is either version 2.2 or (most of the time) 2.4. The OTel agent is a set of binary loadable modules and those are compiled against specific Apache HTTPD version - different headers etc. Therefore you have to use the specific version of agent. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Based on the version setting, auto-instrumentation configures Apache HTTPD with the proper set of modules to be loaded. The docker image with the agent contains modules for both supported versions. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pavol, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. merged, thanks ❤️ |
||
|
||
// Location of Apache HTTPD server configuration. | ||
// Needed only if different from default "/usr/local/apache2/conf" | ||
// +optional | ||
ConfigPath string `json:"configPath,omitempty"` | ||
} | ||
|
||
// InstrumentationStatus defines status of the instrumentation. | ||
type InstrumentationStatus struct { | ||
} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what exactly is this configuring?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The OTel module for Apache httpd has number of configurable attributes (listed at https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/otel-webserver-module in Configuration section). There are reasonable defaults and some will be set by the instrumentation process, this gives a means to override those defaults.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add this link to the godoc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done