You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's a desire to reserve a specific namespace, in this case, .opentelemetry.io/, for special instructions or configurations related to OpenTelemetry.
408
-
409
-
User-Defined Values in the Namespace:
410
-
Users are expected to set values within this reserved namespace, such as 'resource.opentelemetry.io/service.name' or 'resource.opentelemetry.io/my.attribute: some-value' on a pod or deployment.
411
-
412
-
Recognition by OpenTelemetry Operator:
413
-
The OpenTelemetry Operator should be designed to recognize and understand these user-defined values within the reserved namespace.
414
-
415
-
Purpose of Recognition:
416
-
Upon recognizing these values, the OpenTelemetry Operator is expected to perform certain actions or configurations based on the provided instructions.
417
-
For example, if a user sets 'resource.opentelemetry.io/service.name' on a pod, the operator should understand that this is an instruction to set the service name for that specific pod.
418
-
419
-
Dynamic Configuration Based on Annotations:
420
-
Annotations on Kubernetes resources (e.g., pods or deployments) are used as a means of providing configuration instructions.
421
-
If an annotation like 'resource.opentelemetry.io/my.attribute: some-value' is set, the OpenTelemetry Operator should interpret this as an instruction to set a specific attribute (e.g., my.attribute) with a particular value (some-value) for the associated resource.
422
-
423
-
424
-
425
-
TODO
426
-
according to the issue the end result should be something like this:
427
-
for example, if I was to set 'resource.opentelemetry.io/service.name' on a pod, then use instrumentation CRDs to add instrumentation, the value of that annotation would be propagated to the instrumentation.
428
-
429
-
the above example is doing that in the following way: if a user sets 'resource.opentelemetry.io/service.name' on a pod, the operator should understand that this is an instruction to set the service name for that specific pod.
430
-
then the operator should interpret this as an instruction to set a specific attribute (e.g., my.attribute) with a particular value (some-value) for the associated resource.
431
-
and finally the operator should propagate the value of that annotation to the instrumentation.
432
-
433
-
in simple words the operator should understand that this is an instruction to set the service name for that specific pod and then propagate the value of that annotation to the instrumentation.
434
-
propogate means that the operator should interpret this as an instruction to set a specific attribute (e.g., my.attribute) with a particular value (some-value) for the associated resource.
435
-
436
-
*/
437
-
438
-
/*
439
-
Add a new namespace as a reserved namespace (e.g., *.opentelemetry.io/*).
440
-
Add a new function to the operator to recognize and understand user-defined values within the reserved namespace.
441
-
Add a new function to the operator to perform certain actions or configurations based on the provided instructions.
442
-
Add a new function to the operator to set the service name for that specific pod.
443
-
Add a new function to the operator to set a specific attribute (e.g., my.attribute) with a particular value (some-value) for the associated resource.
444
-
Add a new function to the operator to interpret this as an instruction to set a specific attribute (e.g., my.attribute) with a particular value (some-value) for the associated resource.
445
-
In the createResourceMap function, add code to parse the reserved namespace and set the associated values as resource attributes.
// what we need to do here is to recognize and understand user-defined values within the reserved namespace.
464
-
// what kind of user-defined values? the ones that are set on a pod or deployment.
465
-
// how do we do that? we need to use annotations on Kubernetes resources (e.g., pods or deployments) as a means of providing configuration instructions.
466
-
// what kind of annotations? the ones that are set on a pod or deployment.
467
-
// we will use recognise if the user set the value as open-telemetry.io/attribute: some-value
468
-
// then we will use the value of that annotation to set a specific attribute (e.g., my.attribute) with a particular value (some-value) for the associated resource.
428
+
// recognizeUserDefinedValues recognizes user defined values assigned with opentelemetry.io/ prefix
0 commit comments