Skip to content

Commit

Permalink
fix(ci): add missing cfg conversion for debug metrics in `otelcolconv…
Browse files Browse the repository at this point in the history
…ert`

Signed-off-by: hainenber <[email protected]>
  • Loading branch information
hainenber committed May 11, 2024
1 parent 998b631 commit 72aa48f
Show file tree
Hide file tree
Showing 17 changed files with 26 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func toAttributesProcessor(state *State, id component.InstanceID, cfg *attribute
Metrics: ToTokenizedConsumers(nextMetrics),
Logs: ToTokenizedConsumers(nextLogs),
Traces: ToTokenizedConsumers(nextTraces)},
DebugMetrics: common.DefaultValue[attributes.Arguments]().DebugMetrics,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ func (basicAuthConverterConverter) ConvertAndAppend(state *State, id component.I

func toBasicAuthExtension(cfg *basicauthextension.Config) *basic.Arguments {
return &basic.Arguments{
Username: cfg.ClientAuth.Username,
Password: alloytypes.Secret(string(cfg.ClientAuth.Password)),
Username: cfg.ClientAuth.Username,
Password: alloytypes.Secret(string(cfg.ClientAuth.Password)),
DebugMetrics: common.DefaultValue[basic.Arguments]().DebugMetrics,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,6 @@ func toBatchProcessor(state *State, id component.InstanceID, cfg *batchprocessor
Logs: ToTokenizedConsumers(nextLogs),
Traces: ToTokenizedConsumers(nextTraces),
},
DebugMetrics: common.DefaultValue[batch.Arguments]().DebugMetrics,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ func (bearerTokenAuthExtensionConverter) ConvertAndAppend(state *State, id compo

func toBearerTokenAuthExtension(cfg *bearertokenauthextension.Config) *bearer.Arguments {
return &bearer.Arguments{
Scheme: cfg.Scheme,
Token: alloytypes.Secret(string(cfg.BearerToken)),
Scheme: cfg.Scheme,
Token: alloytypes.Secret(string(cfg.BearerToken)),
DebugMetrics: common.DefaultValue[bearer.Arguments]().DebugMetrics,
}
}

Expand All @@ -78,6 +79,7 @@ func toBearerTokenAuthExtensionWithFilename(state *State, cfg *bearertokenauthex
state.Body().AppendBlock(block)

return &bearer.Arguments{
Scheme: cfg.Scheme,
Scheme: cfg.Scheme,
DebugMetrics: common.DefaultValue[bearer.Arguments]().DebugMetrics,
}, fmt.Sprintf("%s.content", StringifyBlock(block))
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,6 @@ func toFilterProcessor(state *State, id component.InstanceID, cfg *filterprocess
Logs: ToTokenizedConsumers(nextLogs),
Traces: ToTokenizedConsumers(nextTraces),
},
DebugMetrics: common.DefaultValue[filter.Arguments]().DebugMetrics,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ func toHeadersSetterExtension(cfg *headerssetterextension.Config) *headers.Argum
}

return &headers.Arguments{
Headers: res,
Headers: res,
DebugMetrics: common.DefaultValue[headers.Arguments]().DebugMetrics,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,6 @@ func toJaegerRemoteSamplingExtension(cfg *jaegerremotesampling.Config) *jaeger_r
File: cfg.Source.File,
ReloadInterval: cfg.Source.ReloadInterval,
},
DebugMetrics: common.DefaultValue[jaeger_remote_sampling.Arguments]().DebugMetrics,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ func toK8SAttributesProcessor(state *State, id component.InstanceID, cfg *k8satt
Logs: ToTokenizedConsumers(nextLogs),
Traces: ToTokenizedConsumers(nextTraces),
},

DebugMetrics: common.DefaultValue[k8sattributes.Arguments]().DebugMetrics,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,6 @@ func toMemoryLimiterProcessor(state *State, id component.InstanceID, cfg *memory
Logs: ToTokenizedConsumers(nextLogs),
Traces: ToTokenizedConsumers(nextTraces),
},
DebugMetrics: common.DefaultValue[memorylimiter.Arguments]().DebugMetrics,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@ func toOAuth2ClientAuthExtension(cfg *oauth2clientauthextension.Config) *oauth2.
Scopes: cfg.Scopes,
TLSSetting: toTLSClientArguments(cfg.TLSSetting),
Timeout: cfg.Timeout,
DebugMetrics: common.DefaultValue[oauth2.Arguments]().DebugMetrics,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,6 @@ func toProbabilisticSamplerProcessor(state *State, id component.InstanceID, cfg
Logs: ToTokenizedConsumers(nextLogs),
Traces: ToTokenizedConsumers(nextTraces),
},
DebugMetrics: common.DefaultValue[probabilistic_sampler.Arguments]().DebugMetrics,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,6 @@ func toServicegraphConnector(state *State, id component.InstanceID, cfg *service
Output: &otelcol.ConsumerArguments{
Metrics: ToTokenizedConsumers(nextMetrics),
},
DebugMetrics: common.DefaultValue[servicegraph.Arguments]().DebugMetrics,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,6 @@ func toSigV4AuthExtension(cfg *sigv4authextension.Config) *sigv4.Arguments {
SessionName: cfg.AssumeRole.SessionName,
STSRegion: cfg.AssumeRole.STSRegion,
},
DebugMetrics: common.DefaultValue[sigv4.Arguments]().DebugMetrics,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,7 @@ func toSpanmetricsConnector(state *State, id component.InstanceID, cfg *spanmetr
Output: &otelcol.ConsumerArguments{
Metrics: ToTokenizedConsumers(nextMetrics),
},

DebugMetrics: common.DefaultValue[spanmetrics.Arguments]().DebugMetrics,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ func toSpanProcessor(state *State, id component.InstanceID, cfg *spanprocessor.C
Output: &otelcol.ConsumerArguments{
Traces: ToTokenizedConsumers(nextTraces),
},
DebugMetrics: common.DefaultValue[span.Arguments]().DebugMetrics,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func toTailSamplingProcessor(state *State, id component.InstanceID, cfg *tailsam
Output: &otelcol.ConsumerArguments{
Traces: ToTokenizedConsumers(nextTraces),
},
DebugMetrics: common.DefaultValue[tail_sampling.Arguments]().DebugMetrics,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ func toTransformProcessor(state *State, id component.InstanceID, cfg *transformp
Logs: ToTokenizedConsumers(nextLogs),
Traces: ToTokenizedConsumers(nextTraces),
},
DebugMetrics: common.DefaultValue[transform.Arguments]().DebugMetrics,
}
}

Expand Down

0 comments on commit 72aa48f

Please sign in to comment.