Skip to content

Commit ee10c4c

Browse files
Merge branch 'main' into rashmi/keepequal-fix
2 parents 359bd30 + d672bc9 commit ee10c4c

File tree

31 files changed

+989
-1
lines changed

31 files changed

+989
-1
lines changed
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
2+
change_type: enhancement
3+
4+
# The name of the component, or a single word describing the area of concern, (e.g. collector, target allocator, auto-instrumentation, opamp, github action)
5+
component: instrumentation
6+
7+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
8+
note: Instrumentation now automatically add node and pod ips as env vars `OTEL_NODE_IP` and `OTEL_POD_IP` to instrumented containers.
9+
10+
# One or more tracking issues related to the change
11+
issues: [2769]
12+
13+
# (Optional) One or more lines of additional information to render under the primary note.
14+
# These lines will be padded with 2 spaces and then inserted directly into the document.
15+
# Use pipe (|) for multiline entries.
16+
subtext:

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,8 @@ The value for `sampler.type` is added to the `OTEL_TRACES_SAMPLER` environment v
263263
Valid values for `sampler.type` are defined by the [OpenTelemetry Specification for OTEL_TRACES_SAMPLER](https://opentelemetry.io/docs/concepts/sdk-configuration/general-sdk-configuration/#otel_traces_sampler).
264264
The value for `sampler.argument` is added to the `OTEL_TRACES_SAMPLER_ARG` environment variable. Valid values for `sampler.argument` will depend on the chosen sampler. See the [OpenTelemetry Specification for OTEL_TRACES_SAMPLER_ARG](https://opentelemetry.io/docs/concepts/sdk-configuration/general-sdk-configuration/#otel_traces_sampler_arg) for more details.
265265

266+
The instrumentation will automatically inject `OTEL_NODE_IP` and `OTEL_POD_IP` environment variables should you need to reference either value in an endpoint.
267+
266268
The above CR can be queried by `kubectl get otelinst`.
267269

268270
Then add an annotation to a pod to enable injection. The annotation can be added to a namespace, so that all pods within

pkg/constants/env.go

+2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ const (
3333

3434
EnvPodName = "OTEL_RESOURCE_ATTRIBUTES_POD_NAME"
3535
EnvPodUID = "OTEL_RESOURCE_ATTRIBUTES_POD_UID"
36+
EnvPodIP = "OTEL_POD_IP"
3637
EnvNodeName = "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME"
38+
EnvNodeIP = "OTEL_NODE_IP"
3739

3840
FlagApacheHttpd = "enable-apache-httpd-instrumentation"
3941
FlagDotNet = "enable-dotnet-instrumentation"

0 commit comments

Comments
 (0)