Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/contributor/assets/metric-gateway-pipelines.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion internal/otelcollector/config/common/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ const (
// CONNECTORS
// ================================================================================

ComponentIDForwardConnector = "forward/%s" // dynamically filled with pipeline name
ComponentIDForwardConnector = "forward"
ComponentIDRoutingConnector = "routing/%s" // dynamically filled with pipeline name
ComponentIDEnrichmentRoutingConnector = "routing/enrichment"
ComponentIDRuntimeInputRoutingConnector = "routing/runtime-input"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ func FilterSpecsToTraceFilterProcessorConfig(specs []telemetryv1alpha1.FilterSpe
return &FilterProcessor{
ErrorMode: defaultFilterProcessorErrorMode,
Traces: FilterProcessorTraces{
// Use span context as it is it is always present even though spanevents is the lowest one
// Use span as context instead of spanevents, because while more granular, spanevents aren't always present
// span event filtering is not supported by user-defined filter until filter processor supports context inference
Span: mergedConditions,
},
Expand Down
2 changes: 2 additions & 0 deletions internal/otelcollector/config/logagent/config_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ func (b *Builder) Build(ctx context.Context, pipelines []telemetryv1alpha1.LogPi
b.addK8sAttributesProcessor(opts),
b.addInsertClusterAttributesProcessor(opts),
b.addServiceEnrichmentProcessor(),
// Kyma attributes are dropped before user-defined transform and filter processors
// to prevent user access to internal attributes.
b.addDropKymaAttributesProcessor(),
b.addUserDefinedTransformProcessor(),
b.addUserDefinedFilterProcessor(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func TestBuildConfig(t *testing.T) {
}).
Build(),
},
goldenFileName: "two-pipelines-with-transforms.yaml",
goldenFileName: "user-defined-transforms.yaml",
},
{
name: "two pipelines with user-defined filter",
Expand All @@ -122,7 +122,7 @@ func TestBuildConfig(t *testing.T) {
}).
Build(),
},
goldenFileName: "two-pipelines-with-filter.yaml",
goldenFileName: "user-defined-filters.yaml",
},
{
name: "pipeline with user-defined transform and filter",
Expand All @@ -140,7 +140,7 @@ func TestBuildConfig(t *testing.T) {
}).
Build(),
},
goldenFileName: "pipeline-with-transform-filter.yaml",
goldenFileName: "user-defined-transform-filter.yaml",
},
}

Expand Down
2 changes: 2 additions & 0 deletions internal/otelcollector/config/loggateway/config_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ func (b *Builder) Build(ctx context.Context, pipelines []telemetryv1alpha1.LogPi
b.addNamespaceFilterProcessor(),
b.addInsertClusterAttributesProcessor(opts),
b.addServiceEnrichmentProcessor(),
// Kyma attributes are dropped before user-defined transform and filter processors
// to prevent user access to internal attributes.
b.addDropKymaAttributesProcessor(),
b.addIstioAccessLogsEnrichmentProcessor(opts),
b.addUserDefinedTransformProcessor(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func TestBuildConfig(t *testing.T) {
}).
Build(),
},
goldenFileName: "two-pipelines-with-transforms.yaml",
goldenFileName: "user-defined-transforms.yaml",
},
{
name: "two pipelines with user-defined filter",
Expand All @@ -127,7 +127,7 @@ func TestBuildConfig(t *testing.T) {
}).
Build(),
},
goldenFileName: "two-pipelines-with-filter.yaml",
goldenFileName: "user-defined-filters.yaml",
},
{
name: "pipeline with user-defined transform and filter",
Expand All @@ -143,7 +143,7 @@ func TestBuildConfig(t *testing.T) {
Conditions: []string{"IsMatch(log.attributes[\"foo\"], \".*bar.*\")"},
}).Build(),
},
goldenFileName: "pipeline-with-transform-filter.yaml",
goldenFileName: "user-defined-transform-filter.yaml",
},
}

Expand Down
2 changes: 2 additions & 0 deletions internal/otelcollector/config/metricagent/config_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ func (b *Builder) Build(ctx context.Context, pipelines []telemetryv1alpha1.Metri
// Generic processors
b.addInsertClusterAttributesProcessor(opts),
b.addDropSkipEnrichmentAttributeProcessor(),
// Kyma attributes are dropped before user-defined transform and filter processors
// to prevent user access to internal attributes.
b.addDropKymaAttributesProcessor(),
b.addUserDefinedTransformProcessor(),
b.addUserDefinedFilterProcessor(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ func TestBuildConfig(t *testing.T) {
},
{
name: "two pipelines with user-defined filter",
goldenFileName: "two-pipelines-with-filter.yaml",
goldenFileName: "user-defined-filters.yaml",
pipelines: []telemetryv1alpha1.MetricPipeline{
testutils.NewMetricPipelineBuilder().
WithName("test1").
Expand All @@ -341,7 +341,7 @@ func TestBuildConfig(t *testing.T) {
},
{
name: "pipeline with user-defined transform and filter",
goldenFileName: "pipeline-with-transform-filter.yaml",
goldenFileName: "user-defined-transform-filter.yaml",
pipelines: []telemetryv1alpha1.MetricPipeline{
testutils.NewMetricPipelineBuilder().
WithName("test1").
Expand Down
Loading
Loading