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

Use instrumentation config for runtime details #2115

Merged
merged 16 commits into from
Jan 4, 2025

Conversation

RonFed
Copy link
Collaborator

@RonFed RonFed commented Jan 1, 2025

  • Add conditions to instrumentationConfig status.
  • Update the relevant conversion in UI to handle this change.
  • Modify the controllers under instrumentor/instrumentationdevice to rely on instrumnentation config, This means that when we add our device as a resource we'll look at the instrumentationConfig to decide.
  • Remove envoverwriter_test as it becomes un-relevant and conflicts with these changes.
  • Update workload-lifecycle chainsaw assertions to be based on instrumentationConfig.
    • Remove the language-change deployment from the workload-lifecycle test. This is done because a) The test requires the restart of the instrumentor which is not the desired behavior and b) The instrumentationConfig is currently enforced to only set the runtime details once, hence we currently don't support this use case.
  • Remove instrumented Application from describe.

@RonFed RonFed marked this pull request as draft January 1, 2025 11:45
@RonFed RonFed marked this pull request as ready for review January 1, 2025 15:02
Copy link
Contributor

@BenElferink BenElferink left a comment

Choose a reason for hiding this comment

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

Frontend looks good to me 😄

cli/cmd/resources/instrumentor.go Show resolved Hide resolved
@@ -229,40 +229,9 @@ func analyzeRuntimeInfo(resources *OdigosSourceResources) *RuntimeInfoAnalyze {
}
}

func analyzeInstrumentedApplication(resources *OdigosSourceResources) InstrumentedApplicationAnalyze {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we also remove InstrumentedApplicationAnalyze type now?

return false
}

if len(oldIc.Status.RuntimeDetailsByContainer) != len(newIc.Status.RuntimeDetailsByContainer) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

The event filter claims to pass the event if the runtime details changed. here we only check for the length of the array, which is good for now, but we will need to also check the content once it can be updated

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Right, Added a comment about this

}

func (i RuntimeDetailsChangedPredicate) Delete(e event.DeleteEvent) bool {
return false
Copy link
Collaborator

Choose a reason for hiding this comment

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

what will cause odigos to remove the instrumentation device when an app is un-instrumented?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Right! a great catch 🥇
Fixed 😄

frontend/endpoints/sources.go Show resolved Hide resolved
@RonFed RonFed merged commit 52ee331 into odigos-io:main Jan 4, 2025
32 checks passed
@RonFed RonFed deleted the use_inst_config_for_runtimeDetails branch January 4, 2025 12:12
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.

5 participants