-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add tracing configuration to services
Add tracing configuration to all services by adding environment variables to the deployment files. The environment variables are used to configure the tracing settings for the services. The following environment variables were added to each service: - HTTP_TRACE_TRACE_PARENT - HTTP_TRACE_TRACE_STATE - HTTP_TRACE_GRPC_TRACE_BIN - GRPC_TRACE_TRACE_PARENT - GRPC_TRACE_TRACE_STATE - GRPC_TRACE_GRPC_TRACE_BIN Also, change the app-protocol to grpc in the integration-grpc-service.yaml and remote.yaml files. Add a launch.json file to the gateway service to enable debugging in VSCode. In the grpc.go file, set the dapr-app-id header to "remote" to enable tracing. Update the test.http file to include a test for the new /http endpoint and a test for the /grpc endpoint.
- Loading branch information
1 parent
0c2e51f
commit 92bb1a9
Showing
7 changed files
with
86 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Launch Package", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "auto", | ||
"program": "${fileDirname}" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,50 @@ | ||
@remote = https://denis.dev.releaseband.com | ||
@remoteDapr = https://denis-dapred.dev.releaseband.com | ||
@hostname = localhost | ||
@contentType = application/json | ||
|
||
### | ||
|
||
# @name launch | ||
POST /launch HTTP/1.1 | ||
Host: {{hostname}}:8080 | ||
Content-Type: {{contentType}} | ||
Host: localhost:8080 | ||
Content-Type: application/json | ||
|
||
{ | ||
"playerId": "player", | ||
"gameId": "game" | ||
} | ||
|
||
### | ||
|
||
@token = {{launch.response.body.token}} | ||
|
||
# @name init | ||
POST {{remote}}/init HTTP/1.1 | ||
# POST /init HTTP/1.1 | ||
# Host: {{hostname}}:8081 | ||
Content-Type: {{contentType}} | ||
Content-Type: application/json | ||
|
||
{ | ||
"token": "{{token}}" | ||
} | ||
|
||
### | ||
|
||
# @name balance | ||
POST /integration.v1.IntegrationService/GetBalance HTTP/1.1 | ||
Host: {{hostname}}:8081 | ||
Content-Type: {{contentType}} | ||
Host: localhost:8080 | ||
Content-Type: application/json | ||
|
||
{ | ||
"player_id": "123" | ||
} | ||
|
||
### | ||
|
||
# @name dapr | ||
POST /v1.0/invoke/gateway/method/init HTTP/1.1 | ||
Host: {{hostname}}:8282 | ||
Content-Type: {{contentType}} | ||
|
||
{ | ||
"token": "{{token}}" | ||
} | ||
# @name http | ||
POST {{remote}}/http HTTP/1.1 | ||
Content-Type: application/json | ||
|
||
### | ||
# @name grpc | ||
POST {{remote}}/grpc HTTP/1.1 | ||
Content-Type: application/json | ||
|
||
# @name gateway | ||
POST {{remote}}/gateway HTTP/1.1 | ||
Content-Type: {{contentType}} | ||
### | ||
# @name test | ||
POST /http HTTP/1.1 | ||
Host: localhost:6000 | ||
Content-Type: application/json | ||
traceparent: 00-58f774820d1130301d91423693afc257-f8a45c3285e07fef-01 |