Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ogen-go/example
Sample project with client, server and OpenTelemetry integration
https://github.com/ogen-go/example
client example ogen openapi server
Last synced: about 2 months ago
JSON representation
Sample project with client, server and OpenTelemetry integration
- Host: GitHub
- URL: https://github.com/ogen-go/example
- Owner: ogen-go
- License: apache-2.0
- Created: 2022-07-25T14:09:47.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-02T04:40:43.000Z (about 2 months ago)
- Last Synced: 2024-11-02T05:21:59.302Z (about 2 months ago)
- Topics: client, example, ogen, openapi, server
- Language: Go
- Homepage:
- Size: 397 KB
- Stars: 27
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# example
Example for generated server and client, instrumented with OpenTelemetry.
* Force `go.mod` to have ogen in [tools.go](./tools.go)
* Generate code by [gen.go](./gen.go)
* OpenTelemetry setup boilerplate in [go-faster/sdk](https://pkg.go.dev/github.com/go-faster/sdk/app)
* Advanced `net/http` instrumentation in [internal/httpmiddleware](./internal/httpmiddleware)```bash
docker compose up
```You can open Grafana dashboard on http://localhost:3000 to observe telemetry.
For example, you can see client traces in [TraceQL explore][traces].[traces]: http://localhost:3000/explore?orgId=1&left=%7B%22datasource%22:%22tempo-oteldb%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22datasource%22:%7B%22type%22:%22tempo%22,%22uid%22:%22tempo-oteldb%22%7D,%22queryType%22:%22nativeSearch%22,%22limit%22:20,%22serviceName%22:%22client%22%7D%5D,%22range%22:%7B%22from%22:%22now-1h%22,%22to%22:%22now%22%7D%7D