Skip to content

Commit

Permalink
using service.name for check error logs (#2944)
Browse files Browse the repository at this point in the history
* using service.name for check error logs

* remove scale tests from qa

* added service.type to logs
  • Loading branch information
juliaElastic authored Sep 4, 2023
1 parent d216aa0 commit ffb5b8d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
7 changes: 1 addition & 6 deletions .buildkite/pipeline.tests-qa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,11 @@ steps:
CHECK_CONTAINER_RESTART_COUNT: true
CONTAINER_NAME: fleet-server
CHECK_API_REQUEST_METRICS: true
SERVICE_TYPE_FIELD: service.name
- label: ":rocket: Run Smoke tests"
trigger: "fleet-smoke-tests"
build:
message: "${BUILDKITE_MESSAGE}"
env:
ENVIRONMENT: ${ENVIRONMENT}
- label: ":rocket: Run Scale tests"
trigger: "fleet-scale-tests"
build:
message: "${BUILDKITE_MESSAGE}"
env:
ENVIRONMENT: ${ENVIRONMENT}

3 changes: 2 additions & 1 deletion .buildkite/pipeline.tests-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ steps:
CHECK_LOG_ERROR_RATE: true
CHECK_CONTAINER_RESTART_COUNT: true
CONTAINER_NAME: fleet-server
CHECK_API_REQUEST_METRICS: true
CHECK_API_REQUEST_METRICS: true
SERVICE_TYPE_FIELD: service.name
1 change: 1 addition & 0 deletions internal/pkg/logger/ecs.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const (

// Service
ECSServiceName = "service.name"
ECSServiceType = "service.type"
)

// Non ECS compliant contants used in logging
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func configure(cfg *config.Config, svcName string) (lg zerolog.Logger, wr Writer
lg = lg.Level(zerolog.TraceLevel)

if svcName != "" {
lg = lg.With().Str(ECSServiceName, svcName).Logger()
lg = lg.With().Str(ECSServiceName, svcName).Str(ECSServiceType, svcName).Logger()
}

return //nolint:nakedret // short function
Expand Down

0 comments on commit ffb5b8d

Please sign in to comment.