You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhance the Connector model to support mapping monitors as OpenTelemetry Resources and allow attaching other monitors to these resources. This will involve:
Adding two new fields: isResource and attachToResource in the mapping section of the YAML connector.
Updating the Monitor class accordingly.
Updating the discovery and the simple strategies to interpret isResource and attachToResource.
Updating the agent to create new OpenTelemetry Resources defined by the connector and attach metrics to these new OpenTelemetry Resources.
Requirements
YAML Model Updates (Connector):
In the Mapping object add isResource field to indicate a monitor is an OpenTelemetry Resource.
In the Mapping object add attachToResource field to specify relationship and attach monitor to the defined OpenTelemetry Resource.
Rename resource to attachedToResource to clearly express the relationship mechanism.
Steps to Implement
Update YAML Schema:
Modify the Connector model to handle isResource and attachToResource fields.
Update Monitor Model:
Add the new fields to the Monitor class.
Update the Engine's Discovery and Simple Strategies:
Implement the logic in the AbstractAllAtOnceStrategy to interpret attachToResource from the connector mapping and create the attachedToResource field (Type: Resource) in the Monitor class accordingly. This involves renaming the resource field to attachedToResource, particularly in the MonitorFactory and within the Monitor class.
Implement the logic in the AbstractAllAtOnceStrategy to interpret isResource from the connector mapping and appropriately flag the isResource field in the Monitor class. This requires updating the MonitorFactory to ensure smooth monitor creation and updates.
Modify the MetricsHub Agent:
The following agent updates should be manage by org.sentrysoftware.metricshub.agent.service.task.MonitoringTask.
Before initializing the OpenTelemetry Metric Observers for each monitor's metrics:
Case 1: If the current monitor defines attachedToResource:
From the TelemetryManager, retrieve the monitor matching the attributes and the type values defined in attachedToResource field. Let's call it resourceMonitor.
If resourceMonitor is not found go to Case 2.
Otherwise:
Create a new OpenTelemetry Resource using the resourceMonitor attributes.
Generate a new AutoConfiguredOpenTelemetrySdk using the new OpenTelemetry Resource.
Initialize the observers using the new OpenTelemetry Resource.
Case 2: If no attachedToResource in the monitor:
Initialize the Metric Observer as it is currently done, I.e. using the main OpenTelemetry Resource, currently created from host endpoint monitor attributes.
The text was updated successfully, but these errors were encountered:
Use case
Enhance the
Connector
model to support mapping monitors as OpenTelemetry Resources and allow attaching other monitors to these resources. This will involve:isResource
andattachToResource
in themapping
section of the YAML connector.Monitor
class accordingly.isResource
andattachToResource
.Requirements
YAML Model Updates (Connector):
isResource
field to indicate a monitor is an OpenTelemetry Resource.attachToResource
field to specify relationship and attach monitor to the defined OpenTelemetry Resource.Example YAML Configuration
Monitor Model Changes
Monitor
class:isResource: boolean
resource
toattachedToResource
to clearly express the relationship mechanism.Steps to Implement
Update YAML Schema:
isResource
andattachToResource
fields.Update Monitor Model:
Monitor
class.Update the Engine's Discovery and Simple Strategies:
AbstractAllAtOnceStrategy
to interpretattachToResource
from the connector mapping and create theattachedToResource
field (Type: Resource) in theMonitor
class accordingly. This involves renaming theresource
field toattachedToResource
, particularly in theMonitorFactory
and within theMonitor
class.AbstractAllAtOnceStrategy
to interpretisResource
from the connector mapping and appropriately flag theisResource
field in theMonitor
class. This requires updating theMonitorFactory
to ensure smooth monitor creation and updates.Modify the MetricsHub Agent:
org.sentrysoftware.metricshub.agent.service.task.MonitoringTask
.Case 1
: If the current monitor definesattachedToResource
:TelemetryManager
, retrieve the monitor matching theattributes
and thetype
values defined inattachedToResource
field. Let's call itresourceMonitor
.resourceMonitor
is not found go toCase 2
.OpenTelemetry Resource
using theresourceMonitor
attributes.AutoConfiguredOpenTelemetrySdk
using the newOpenTelemetry Resource
.OpenTelemetry Resource
.Case 2
: If noattachedToResource
in the monitor:OpenTelemetry Resource
, currently created fromhost
endpoint monitor attributes.The text was updated successfully, but these errors were encountered: