-
Notifications
You must be signed in to change notification settings - Fork 209
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: opamp persist health message #1398
Conversation
|
||
// AgentHealthStatusUnsupportedRuntimeVersion represents that the agent is running on an unsupported runtime version | ||
// For example: Otel sdk supports node.js >= 14 and workload is running with node.js 12 | ||
AgentHealthStatusUnsupportedRuntimeVersion = "UnsupportedRuntimeVersion" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason why in some of the cases you mention that it is AgentHealthStatus (which is string) and sometimes set it explicitly to a string?
return c | ||
}) | ||
} | ||
type fnOpt func(odigosv1.InstrumentationInstanceStatus) odigosv1.InstrumentationInstanceStatus |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this fnOpt means?
I need you to elaborate me about updateInstrumentationInstanceStatus
proc in general
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed to updateInstrumentationInstanceStatusOpt
opampserver/pkg/server/handlers.go
Outdated
} | ||
|
||
return nil | ||
} | ||
|
||
func (c *ConnectionHandlers) PersistInstrumentationDeviceStatus(ctx context.Context, message *protobufs.AgentToServer, connectionInfo *connection.ConnectionInfo) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eventually this function update the instrumentation instance right?
WDYT about calling it UpdateInstrumentationInstanceStatus
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, renamed the function 👍
dynamicOptions = append(dynamicOptions, instrumentation_instance.WithAttributes(identifyingAttributes, []odigosv1.Attribute{})) | ||
} | ||
|
||
isAgentDisconnect := message.AgentDisconnect != nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe better to check at the beginning of this func?
so it will return errors before creating the dynamicOptions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved to the top 👍
No description provided.