You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhance GraphQL OTEL instrumentation with custom metrics and traces (#2673)
## Why make this change?
This closes#2642
## What is this change?
This PR enhances the OTEL instrumentation for the GraphQL APIs by adding
custom traces and metrics.
Metrics can be filtered for `status_code`, `api_type`, `endpoint` and
`method`.
## How was this tested?
- [X] Local Testing
- [ ] Integration Tests
- [ ] Unit Tests
All of the tests were done locally to check if the log information that
was provided was correct, for both scenarios in which the query gave the
proper information or when an exception was raised.
Another thing that was tested is that when we open GraphQL it would send
a few requests called `Introspection Queries` used to ensure that
GraphQL is working properly. However, we do not want the user to see
these requests as part of the total count as this is done automatically,
which may confuse the users.
## Sample Request(s)



## Instructions on how to use DAB Workbench
- Clone the following repo
`https://github.com/tommasodotNET/dab-workbench.git`
- Run your DAB version in CLI so the files from the `out` folder are
created, and make sure to stop it before running the DAB Workbench since
both cannot be running at the same time.
- Find the path to the `Microsoft.DataApiBuilder.exe`, which should look
something like
`<PATH_TO_REPO>\data-api-builder\src\out\cli\net8.0\Microsoft.DataApiBuilder.exe`
- Copy the path of the `.exe` file and paste it in the file
`/DABWorkbench.AppHost/Program.cs` in the variable `dabCLIPath` which is
found in line 3 as follows:
`var dabCLIPath =
@"<PATH_TO_REPO>\data-api-builder\src\out\cli\net8.0\Microsoft.DataApiBuilder.exe";`
- Now you should be able to run DAB Workbench with your version of DAB.
---------
Co-authored-by: Tommaso Stocchi <[email protected]>
Co-authored-by: Jerry Nixon <[email protected]>
Co-authored-by: Ruben Cerna <[email protected]>
0 commit comments