Skip to content

Commit 80c6f73

Browse files
committed
Add more useful logging messages
1 parent 4c7ed92 commit 80c6f73

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/actions/deploy-demo/action.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ runs:
2323
- name: update container image version
2424
uses: mikefarah/yq@v4.35.2
2525
with:
26-
cmd: yq -i '.otelDemo.helm.default.image.tag="${{ inputs.containerImageVersion }}"' dash0-configuration/demo/environments/aws/demo-eu-west-1-demo.yaml
26+
cmd: yq -i '.otelDemo.containerVersion="${{ inputs.containerImageVersion }}"' dash0-configuration/demo/environments/aws/demo-eu-west-1-demo.yaml
2727
- name: git push dash0-configuration
2828
shell: bash
2929
run: |
3030
cd dash0-configuration
3131
git config user.name "github-actions[bot]"
3232
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
3333
git add demo/environments/aws/demo-eu-west-1-demo.yaml
34-
git commit -m"chore(otel-demo): update otel-demo image version to ${{ inputs.containerImageVersion }}"
34+
git commit -m"chore(otel-demo): update otel-demo containerVersion to ${{ inputs.containerImageVersion }}"
3535
git push

src/productcatalogservice/main.go

+3
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ func (p *productCatalog) GetProduct(ctx context.Context, req *pb.GetProductReque
264264
msg := fmt.Sprintf("Error: ProductCatalogService Fail Feature Flag Enabled")
265265
span.SetStatus(otelcodes.Error, msg)
266266
span.AddEvent(msg)
267+
log.WithContext(ctx).WithField("request.id", req.Id).Println("ProductCatalogService Fail Feature Flag Enabled")
267268
return nil, status.Errorf(codes.Internal, msg)
268269
}
269270

@@ -279,6 +280,7 @@ func (p *productCatalog) GetProduct(ctx context.Context, req *pb.GetProductReque
279280
msg := fmt.Sprintf("Product Not Found: %s", req.Id)
280281
span.SetStatus(otelcodes.Error, msg)
281282
span.AddEvent(msg)
283+
log.WithContext(ctx).WithField("request.id", req.Id).Println("Product Not Found")
282284
return nil, status.Errorf(codes.NotFound, msg)
283285
}
284286

@@ -287,6 +289,7 @@ func (p *productCatalog) GetProduct(ctx context.Context, req *pb.GetProductReque
287289
span.SetAttributes(
288290
attribute.String("app.product.name", found.Name),
289291
)
292+
log.WithContext(ctx).WithField("app.product.name", found.Name).Println(msg)
290293
return found, nil
291294
}
292295

0 commit comments

Comments
 (0)