Skip to content

Commit

Permalink
Rename Grafana Agent to Alloy in code (#728)
Browse files Browse the repository at this point in the history
  • Loading branch information
marctc authored Apr 9, 2024
1 parent 4960371 commit fd422dd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package grafanaagent
package alloy

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package grafanaagent
package alloy

import (
"testing"
Expand Down
14 changes: 7 additions & 7 deletions pkg/internal/pipe/instrumenter.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"github.com/mariomac/pipes/pkg/node"

"github.com/grafana/beyla/pkg/beyla"
"github.com/grafana/beyla/pkg/internal/export/alloy"
"github.com/grafana/beyla/pkg/internal/export/debug"
agent "github.com/grafana/beyla/pkg/internal/export/grafana_agent"
"github.com/grafana/beyla/pkg/internal/export/otel"
"github.com/grafana/beyla/pkg/internal/export/prom"
"github.com/grafana/beyla/pkg/internal/imetrics"
Expand All @@ -27,9 +27,9 @@ type nodesMap struct {
Routes *transform.RoutesConfig `forwardTo:"Kubernetes"`

// Kubernetes is an optional node. If not set, data will be bypassed to the exporters.
Kubernetes transform.KubernetesDecorator `forwardTo:"Metrics,Traces,Prometheus,Printer,Noop,AgentTraces"`
Kubernetes transform.KubernetesDecorator `forwardTo:"Metrics,Traces,Prometheus,Printer,Noop,AlloyTraces"`

AgentTraces beyla.TracesReceiverConfig
AlloyTraces beyla.TracesReceiverConfig
Metrics otel.MetricsConfig
Traces otel.TracesConfig
Prometheus prom.PrometheusConfig
Expand All @@ -47,7 +47,7 @@ func configToNodesMap(cfg *beyla.Config) *nodesMap {
Prometheus: cfg.Prometheus,
Printer: cfg.Printer,
Noop: cfg.Noop,
AgentTraces: cfg.TracesReceiver,
AlloyTraces: cfg.TracesReceiver,
}
}

Expand Down Expand Up @@ -97,7 +97,7 @@ func newGraphBuilder(ctx context.Context, config *beyla.Config, ctxInfo *global.
graph.RegisterTerminal(gnb, gb.prometheusProvider)
graph.RegisterTerminal(gnb, debug.NoopNode)
graph.RegisterTerminal(gnb, debug.PrinterNode)
graph.RegisterTerminal(gnb, gb.grafanaAgentTracesProvider)
graph.RegisterTerminal(gnb, gb.alloyTracesProvider)

// The returned builder later invokes its "Build" function that, given
// the contents of the nodesMap struct, will automagically instantiate
Expand Down Expand Up @@ -160,6 +160,6 @@ func (gb *graphFunctions) prometheusProvider(config prom.PrometheusConfig) (node
}

//nolint:gocritic
func (gb *graphFunctions) grafanaAgentTracesProvider(config beyla.TracesReceiverConfig) (node.TerminalFunc[[]request.Span], error) {
return agent.TracesReceiver(gb.ctx, config)
func (gb *graphFunctions) alloyTracesProvider(config beyla.TracesReceiverConfig) (node.TerminalFunc[[]request.Span], error) {
return alloy.TracesReceiver(gb.ctx, config)
}

0 comments on commit fd422dd

Please sign in to comment.