Skip to content

Commit

Permalink
Update OpAMP Bridge to comply with its design (#2277)
Browse files Browse the repository at this point in the history
* Update bridge to be spec compliant

* deep copy

* Add more tests

* Fix bork

* update test to be less annoying
  • Loading branch information
jaronoff97 authored Oct 26, 2023
1 parent 07e8ff3 commit 55c5673
Show file tree
Hide file tree
Showing 14 changed files with 407 additions and 253 deletions.
18 changes: 18 additions & 0 deletions .chloggen/update-opamp-bridge-spec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking

# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action)
component: OpAMP Bridge

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Currently, the bridge doesn't adhere to the spec for the naming structure. This changes the bridge to use the <namespace>/<otelcol> structure as described.

# One or more tracking issues related to the change
issues: [2131]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: |
* Updates the bridge to get collectors using the reporting annotation
* Fixes a bug where we were using the incorrect structure for the collectors
2 changes: 1 addition & 1 deletion cmd/operator-opamp-bridge/agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func (agent *Agent) getEffectiveConfig(ctx context.Context) (*protobufs.Effectiv
agent.logger.Error(err, "failed to marhsal config")
return nil, err
}
mapKey := newCollectorKey(instance.GetName(), instance.GetNamespace())
mapKey := newCollectorKey(instance.GetNamespace(), instance.GetName())
instanceMap[mapKey.String()] = &protobufs.AgentConfigFile{
Body: marshaled,
ContentType: "yaml",
Expand Down
Loading

0 comments on commit 55c5673

Please sign in to comment.