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

replace KubeMetadataEntityID with string #29051

Closed

Conversation

jackgopack4
Copy link
Contributor

@jackgopack4 jackgopack4 commented Sep 4, 2024

What does this PR do?

removes the KubeMetadataEntityID alias inside workloadmeta which was simply another name for string

Motivation

Converting an OTel Agent package to a module would no longer rely on workloadmeta/def; this dependency would make it much easier to build the OTel agent for customer collector workflow. Additionally, this alias has no additional functionality besides just giving another name, so it is only making the codebase more difficult to understand without giving benefits.

Additional Notes

We would not need to create/convert more packages (specifically workloadmeta) to go modules and support them down the road.

Possible Drawbacks / Trade-offs

If additional functionality/differentiation from go string type for KubeMetadataEntityID is planned down the road, the type would have to be re-introduced.

Describe how to test/QA your changes

run integration/unit tests

@github-actions github-actions bot added the team/container-platform The Container Platform Team label Sep 4, 2024
@jackgopack4 jackgopack4 added changelog/no-changelog qa/done QA done before merge and regressions are covered by tests labels Sep 4, 2024
@jackgopack4 jackgopack4 added this to the 7.58.0 milestone Sep 4, 2024
@pr-commenter
Copy link

pr-commenter bot commented Sep 4, 2024

Test changes on VM

Use this command from test-infra-definitions to manually test this PR changes on a VM:

inv create-vm --pipeline-id=43533763 --os-family=ubuntu

Note: This applies to commit 93d84c8

@jackgopack4 jackgopack4 marked this pull request as ready for review September 4, 2024 15:16
@jackgopack4 jackgopack4 requested a review from a team as a code owner September 4, 2024 15:16
Copy link
Contributor

@clamoriniere clamoriniere left a comment

Choose a reason for hiding this comment

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

Can we know exactly where the OTEL-agent is depending of the workloadmeta package?

Because it is not attended to be the case.

@pr-commenter
Copy link

pr-commenter bot commented Sep 4, 2024

Regression Detector

Regression Detector Results

Run ID: b87de15e-9e40-4ced-9cab-7e527f04a567 Metrics dashboard Target profiles

Baseline: b5758df
Comparison: 93d84c8

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

No significant changes in experiment optimization goals

Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%

There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
uds_dogstatsd_to_api_cpu % cpu utilization +0.88 [+0.02, +1.73] 1 Logs
idle memory utilization +0.48 [+0.43, +0.52] 1 Logs
basic_py_check % cpu utilization +0.27 [-2.70, +3.23] 1 Logs
uds_dogstatsd_to_api ingress throughput +0.00 [-0.00, +0.00] 1 Logs
tcp_dd_logs_filter_exclude ingress throughput +0.00 [-0.01, +0.01] 1 Logs
otel_to_otel_logs ingress throughput -0.09 [-0.90, +0.73] 1 Logs
pycheck_lots_of_tags % cpu utilization -1.46 [-3.78, +0.86] 1 Logs
file_tree memory utilization -3.11 [-3.21, -3.02] 1 Logs
tcp_syslog_to_blackhole ingress throughput -3.53 [-15.97, +8.90] 1 Logs

Bounds Checks

perf experiment bounds_check_name replicates_passed
idle memory_usage 1/10

Explanation

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

@jackgopack4
Copy link
Contributor Author

our metrics implementation in OTLP currently depends on workloadmeta/collectors/util.GenerateKubeMetadataEntityID function

entityIDs = append(entityIDs, types.NewEntityID(types.KubernetesMetadata, string(util.GenerateKubeMetadataEntityID("", "namespaces", "", namespace.AsString()))))

@jackgopack4 jackgopack4 requested a review from a team as a code owner September 4, 2024 16:20
@jackgopack4 jackgopack4 marked this pull request as draft September 4, 2024 20:57
@jackgopack4
Copy link
Contributor Author

I changed this back to draft as I have another approach that I should be able to share tomorrow. Thanks.

@kacper-murzyn kacper-murzyn removed this from the 7.58.0 milestone Oct 22, 2024
@jackgopack4 jackgopack4 closed this Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog qa/done QA done before merge and regressions are covered by tests team/container-platform The Container Platform Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants