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

Set instance ID from pod:container and let setting metadata from annotations #1391

Merged
merged 6 commits into from
Nov 22, 2024

Conversation

mariomac
Copy link
Contributor

@mariomac mariomac commented Nov 20, 2024

Fixes the way the instance ID is composed. This means that instanceID is not assured to be globally unique anymore, but the service_name/namespace/instance tuple. This required changing some internals about how we use the svc.ID and svc.UID types.

Also, lets overriding the service metadata by means of user-selected pod labels.

This PR also seems to fix (or at leas decrease) a memory leak that was present in the Store, by changing the way that containers are grouped by owner and deleted.

TODO:

  • Integration tests
  • Documentation (to be handled into another PR)

Copy link

codecov bot commented Nov 20, 2024

Codecov Report

Attention: Patch coverage is 93.33333% with 8 lines in your changes missing coverage. Please review.

Project coverage is 81.10%. Comparing base (66b1975) to head (6350aef).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/kubecache/meta/informers_init.go 33.33% 6 Missing ⚠️
pkg/internal/request/span_getters.go 80.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1391      +/-   ##
==========================================
+ Coverage   72.44%   81.10%   +8.65%     
==========================================
  Files         146      146              
  Lines       14742    14731      -11     
==========================================
+ Hits        10680    11947    +1267     
+ Misses       3361     2203    -1158     
+ Partials      701      581     -120     
Flag Coverage Δ
integration-test 58.68% <41.66%> (-0.18%) ⬇️
k8s-integration-test 60.11% <85.83%> (+0.05%) ⬆️
oats-test 34.08% <19.16%> (-0.16%) ⬇️
unittests 51.87% <67.50%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@mariomac mariomac changed the title Set instance ID from container ID and let setting metadata from annotations Set instance ID from pod:container and let setting metadata from annotations Nov 21, 2024
@mariomac mariomac marked this pull request as ready for review November 21, 2024 11:26
@mariomac mariomac merged commit 65111df into grafana:main Nov 22, 2024
13 checks passed
@mariomac mariomac deleted the instance-id-cnt branch November 22, 2024 07:44
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