Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using service.name for check error logs #2944

Merged
merged 3 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
Loading