Skip to content

wip: add OtelExporterEndpoint crd#449

Draft
sofiasimdianova wants to merge 1 commit into
mainfrom
feat/otelexportercrd-support
Draft

wip: add OtelExporterEndpoint crd#449
sofiasimdianova wants to merge 1 commit into
mainfrom
feat/otelexportercrd-support

Conversation

@sofiasimdianova
Copy link
Copy Markdown

No description provided.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 6, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6a00385b-3d1d-45c7-969c-6cd9e1161b81

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/otelexportercrd-support

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.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sofiasimdianova sofiasimdianova changed the title rip: add OtelExporterEndpoint crd wip: add OtelExporterEndpoint crd May 6, 2026
Comment on lines +27 to +30
// +optional
// +kubebuilder:default="http/protobuf"
// +kubebuilder:validation:Enum="http/protobuf";"grpc"
Protocol string `json:"protocol,omitempty"`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can't the protocol be guessed from the endpoint

grpc:// and http://

Comment on lines +33 to +37
type SupportConfig struct {
Enabled bool `json:"enabled"`
// +optional
LicenseSecret string `json:"licenseSecret,omitempty"`
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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"`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 ?

Comment thread cmd/main.go
Environment: env,
LicenceSecret: licenceSecret,
UtilsVersion: utilsVersion,
SupportEndpoint: supportEndpoint,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can't the support endpoint be used within the CRD itself ?

metadata:
name: sample-otel
spec:
stack: sample-stack
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can stack be a selector ? or a wildcard ?

endpoint: "http://my-collector:4318"
support:
enabled: true
licenseSecret: "formance-license"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@Dav-14
Copy link
Copy Markdown
Contributor

Dav-14 commented May 7, 2026

Dirty is not passing. Make sure to run just pc

@sofiasimdianova sofiasimdianova force-pushed the feat/otelexportercrd-support branch from afc0c90 to b9260f3 Compare May 7, 2026 12:54
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.

2 participants