Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(operator)!: Provide default OTLP attribute configuration #14410

Merged
merged 43 commits into from
Oct 23, 2024

Conversation

xperimental
Copy link
Collaborator

@xperimental xperimental commented Oct 7, 2024

What this PR does / why we need it:

The main purpose of this PR is to provide a default set of OTLP attributes that will be persisted when using LokiStack in openshift-logging tenancy mode.

This PR also changes the API for specifying an OTLP attribute configuration in LokiStack to make it easier to use.

Which issue(s) this PR fixes:

LOG-6147

Special notes for your reviewer:

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here

… openshift-logging tenancy

- Extend API for default OTLP label set
- Disable autodetection of service.name
- Update non-otlp config tests
- Simplify OTLP attribute configuration
- Remove validator code
- Content-assist for runtime config
- Add openshift-logging defaults
- Only add ignore_defaults to config if needed
- Use Loki default OTLP attributes when none are specified
Copy link
Collaborator

@periklis periklis left a comment

Choose a reason for hiding this comment

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

quick first pass, testing this right now on my cluster.

Question: How do we define the drop action?

operator/internal/manifests/config_otlp.go Outdated Show resolved Hide resolved
ResourceAttributes: []config.OTLPAttribute{
{
Action: config.OTLPAttributeActionStreamLabel,
Regex: "openshift\\.labels\\..+",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Question: What is considered an OpenShift Label here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think there are any of these labels at the moment. This might be an extension point. I meant to write a question about this in the data-model PR, but I forgot. The attribute configuration itself is from the data-model repository.

operator/internal/manifests/config_otlp.go Outdated Show resolved Hide resolved
@xperimental
Copy link
Collaborator Author

Updated with the changes discussed on Friday. ✔️

Copy link
Collaborator

@periklis periklis left a comment

Choose a reason for hiding this comment

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

Overall LGTM just one question to clarify the non-openshift mode handling. Besides that I suggest to create a follow up PR for a documentation page explaining the append as well as the per-tenant full-override workings of the OTLPSpec. WDYT?

operator/internal/manifests/config_otlp.go Show resolved Hide resolved
Copy link
Collaborator

@JoaoBraveCoding JoaoBraveCoding left a comment

Choose a reason for hiding this comment

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

Apart from what was discussed in the daily lgtm 👍 still didn't manually tested it

image

@xperimental xperimental changed the title feat(operator): Provide default OTLP attribute configuration feat(operator)!: Provide default OTLP attribute configuration Oct 22, 2024
Copy link
Collaborator

@periklis periklis left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

Copy link
Collaborator

@JoaoBraveCoding JoaoBraveCoding left a comment

Choose a reason for hiding this comment

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

lgtm 💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants