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

Update otelcontribcol to 0.106.0-gke.2 #1391

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tiffanny29631
Copy link
Contributor

Due to a refactor in the upstream, the metric transform processor no longer takes label_set:[] as a hint to remove all labels, instead all labels fall through and get exported. See issue for details.

This change is to reapply the upgrade to 0.106.0 to catch up with latest otelcollector but adding the following workaround:

A label no_op_label is given to the label_set of the metrics that need all labels removed. In this case the re-slice function in the core lib will filter out all other valid labels of the metric. As for the no_op_label nothing will be performed as it's not part of the original attributes.

The workaround could be removed or reverted depending on the final solution of upstream.

This reverts commit 1d33f46.

Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from tiffanny29631. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@karlkfi
Copy link
Contributor

karlkfi commented Aug 13, 2024

Why id this safe to re-apply now?

@tiffanny29631
Copy link
Contributor Author

Why id this safe to re-apply now?

Are you referring to the upstream fix or our release schedule?

@karlkfi
Copy link
Contributor

karlkfi commented Aug 14, 2024

I mean, if we reverted it before, why is it now safe to reapply? What changed?

@tiffanny29631
Copy link
Contributor Author

I mean, if we reverted it before, why is it now safe to reapply? What changed?

To ensure correct behavior, we've included a no_op_label in the metricstransform processor's label_set filter (explained in the description). This is a temporary solution until the upstream fix is available, but we need to update to the latest otelcontribcol regardless.

@sdowell
Copy link
Contributor

sdowell commented Aug 14, 2024

I mean, if we reverted it before, why is it now safe to reapply? What changed?

To ensure correct behavior, we've included a no_op_label in the metricstransform processor's label_set filter (explained in the description). This is a temporary solution until the upstream fix is available, but we need to update to the latest otelcontribcol regardless.

This isn't really a revert then, since new changes were added to the original commit. Suggest just creating a new commit instead of reapplying.

we need to update to the latest otelcontribcol regardless.

why?

@tiffanny29631
Copy link
Contributor Author

Re @sdowell While not currently anticipated, there's a possibility that future vulnerability fixes need dependency upgrades that are incompatible with current version we use (0.103). In such cases, the version upgrade process will be similar. Otelcontribcol versions beyond 0.104.0 will introduce breaking changes.

I could start a new PR.

This change updates otelcoontribcol to latest and modifies to fit breaking changes from 0.104.0 and 0.106.0.

Breaking change in 0.104.0 https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.104.0
Breaking change in 0.106.0 open-telemetry/opentelemetry-collector-contrib#34430

- Localhost is now the default setting, while otel-agent and otel-collector require 0.0.0.0, so the feature gate has been removed.
- The format of the environment variable was updated to meet the new syntax requirements. The otel-agent ConfigMap was split between the reconciler and controllers, ensuring that sync-related labels are only applied to reconcilers.
- A `no_op_label` has been added to ensure that the aggregation in the metricstransform processor filters on all metric labels. This is a temporary workaround until a permanent fix is implemented upstream.
@tiffanny29631 tiffanny29631 changed the title Reapply "Bump otelcontribcol version to v0.106.0-gke.2 (#1369)" (#1376) Update otelcontribcol to 0.106.0-gke.2 Aug 16, 2024
@tiffanny29631
Copy link
Contributor Author

Recreated the commit and message.

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

Successfully merging this pull request may close these issues.

3 participants