Skip to content

Commit

Permalink
update default service name
Browse files Browse the repository at this point in the history
  • Loading branch information
jaskerv committed Jun 20, 2023
1 parent 9a3ae61 commit 4ffa8ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion enricher/eks/metric.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (e *Enricher) AddDropCount() {

func inferServiceName(record map[interface{}]interface{}, logType LogType) string {
// fallback in case unable to find service name.
var serviceName interface{} = mappings.PLACEHOLDER_MISSING_KUBERNETES_METADATA
var serviceName interface{} = "_missing_service_name"

k8sPayload, ok := record[mappings.KUBERNETES_RESOURCE_FIELD_NAME].(map[interface{}]interface{})
// k8s field exists, set default to container name.
Expand Down
2 changes: 1 addition & 1 deletion enricher/eks/metric_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func Test_InferServiceName(t *testing.T) {
{
Test: "Invalid",
Input: map[interface{}]interface{}{},
Expected: mappings.PLACEHOLDER_MISSING_KUBERNETES_METADATA,
Expected: "_missing_service_name",
LogType: TYPE_APPLICATION,
},
}
Expand Down

0 comments on commit 4ffa8ef

Please sign in to comment.