Skip to content

Conversation

@Horiodino
Copy link
Contributor

Description: Added additional status information fields for OpenTelemetryCollector sidecar injection.

Link to tracking Issue(s):

Change Type: Enhancement

Component: Collector

Testing: Added unit tests; E2E pending.

Documentation:

@Horiodino
Copy link
Contributor Author

I’ve added some Todos and could use some help. Are any fields missing, or are all the necessary ones included? I’m happy to hear any suggestions.

- `LastInjectionTime`: Timestamp of the last successful sidecar injection
- `LastInjectionError`: Error message from the last failed sidecar injection
- `InjectionStatus`: Status of the sidecar injection process
- `ObservedGeneration`: Last observed generation of the OpenTelemetryCollector resource
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't this already included somewhere in the CR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is specifically for the sidecar for the spec fields , are you refering that injection-related fields LastInjectionTime, LastInjectionError, InjectionStatus probably be expressed through the Conditions? Or Redundant?

}

// updateSidecarStatus gathers information about sidecar injection and updates the status fields.
func updateSidecarStatus(ctx context.Context, cli client.Client, otelcol *v1beta1.OpenTelemetryCollector) error {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you describe at a high level how the status is set?

It seems that the impl is getting a list of pods from the NS of the otelcol CR. I have two observations:

  • the sidecar can be injected in a namespace that does not contain any otelcol CR
  • is the reconciliation triggered when the pod is deleted?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the reconciliation triggered when the pod is deleted?

Oops i missed that

Signed-off-by: Praful Khanduri <[email protected]>

updated bundle & docs

Signed-off-by: Praful Khanduri <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose status information for OpenTelemetryCollector in mode: sidecar

2 participants