Skip to content

Commit

Permalink
Merge branch 'main' into feat/logspipelineprocessor-address-body-fiel…
Browse files Browse the repository at this point in the history
…ds-directly-if-body-is-json
  • Loading branch information
raj-k-singh authored Oct 10, 2024
2 parents 3fae4f0 + f109e00 commit 0aeed7a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions exporter/clickhouselogsexporter/logsv2/fingerprint.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ func ResourceHierarchy() *DimensionHierarchyNode {
"deployment.environment",
"ec2.tag.env-short", // is this standard enough?
"ec2.tag.env", // is this standard enough?
"env",
},

subHierachies: []DimensionHierarchyNode{{
Expand All @@ -153,6 +154,12 @@ func ResourceHierarchy() *DimensionHierarchyNode {
"container.name",
"container_name",
},

subHierachies: []DimensionHierarchyNode{{
labels: []string{
"component",
},
}},
}},
}},
}},
Expand Down
5 changes: 5 additions & 0 deletions exporter/clickhouselogsexporter/logsv2/fingerprint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ func TestCalculateFingerprint(t *testing.T) {
ResourceAttrs: map[string]any{"gcp.project": "myproject", "source_type": "gcp", "random_key": "val"},
FingerPrint: "gcp.project=myproject;source_type=gcp;hash=11162778839006855273",
},
{
Name: "service, env and component",
ResourceAttrs: map[string]any{"service.name": "service", "env": "prod", "component": "service-component"},
FingerPrint: "service.name=service;env=prod;component=service-component;hash=18170521368096690780",
},
}

for _, ts := range testCases {
Expand Down

0 comments on commit 0aeed7a

Please sign in to comment.