wip: add OtelExporterEndpoint crd#449
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| // +optional | ||
| // +kubebuilder:default="http/protobuf" | ||
| // +kubebuilder:validation:Enum="http/protobuf";"grpc" | ||
| Protocol string `json:"protocol,omitempty"` |
There was a problem hiding this comment.
can't the protocol be guessed from the endpoint
grpc:// and http://
| type SupportConfig struct { | ||
| Enabled bool `json:"enabled"` | ||
| // +optional | ||
| LicenseSecret string `json:"licenseSecret,omitempty"` | ||
| } |
There was a problem hiding this comment.
The licence is already passed with the operator config on startup and available globally within core.Platform
| Metrics *OtelSignalConfig `json:"metrics,omitempty"` | ||
|
|
||
| // +optional | ||
| Support *SupportConfig `json:"support,omitempty"` |
There was a problem hiding this comment.
Can't it be set another way ?
With StackDependecy it's set on only one stack ? Compare to Settings which can be set on multiple stacks.
Can't 1 exporter be set on a stack subset ? or globally ? Using labels ?
| Environment: env, | ||
| LicenceSecret: licenceSecret, | ||
| UtilsVersion: utilsVersion, | ||
| SupportEndpoint: supportEndpoint, |
There was a problem hiding this comment.
Can't the support endpoint be used within the CRD itself ?
| metadata: | ||
| name: sample-otel | ||
| spec: | ||
| stack: sample-stack |
There was a problem hiding this comment.
Can stack be a selector ? or a wildcard ?
| endpoint: "http://my-collector:4318" | ||
| support: | ||
| enabled: true | ||
| licenseSecret: "formance-license" |
There was a problem hiding this comment.
At the end,
If we already have the licence-secret on startup we don't need to set it ?
Do we want to enbale the support per-stack ? or per-plane ?
From my POV, the licence is the authentification JWT. and the CRD only need to path the authentification as BEARER <licence-jwt>.
The OtelExporterEndpoint could be agnostic of the support.
Creating a support CRD like
apiVersion: formance.com/v1beta1
kind: OtelExporterEndpoint
metadata:
name: sample-otel
spec:
stackSelector:
matchLabels:
formance.com/stack: rrprwuaxwcpy-aarr
# or
matchExpressions:
- key: formance.com/stack
operator: Exists # "any stack"
- key: formance.com/stack
operator: In
values: [rrprwuaxwcpy-aarr, foo]
- key: formance.com/env
operator: NotIn
values: [prod]
traces:
endpoint: "http://my-collector:4318"
auth:
type: bearer
fromSecret: "formance-license"
There was a problem hiding this comment.
Using Label and Expression we lead to some priority problem. In Settings there is something for "*" or specific List that should be enought i guess
|
Dirty is not passing. Make sure to run |
afc0c90 to
b9260f3
Compare
No description provided.