Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/winlinvip/otel-example
Example for https://opentelemetry.io/docs/instrumentation/go/getting-started/
https://github.com/winlinvip/otel-example
Last synced: about 1 month ago
JSON representation
Example for https://opentelemetry.io/docs/instrumentation/go/getting-started/
- Host: GitHub
- URL: https://github.com/winlinvip/otel-example
- Owner: winlinvip
- License: mit
- Created: 2022-07-20T09:42:26.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-20T09:49:56.000Z (over 2 years ago)
- Last Synced: 2024-05-19T00:37:11.773Z (7 months ago)
- Language: Go
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# otel-example
Example for https://opentelemetry.io/docs/instrumentation/go/getting-started/
## Usage: otel-example
Example for [otel](https://opentelemetry.io/docs/instrumentation/go/getting-started/#creating-a-console-exporter).
Build and run:
```bash
(cd otel-example && go build . && ./otel-example)
```## Usage: otel-http
Example for [http](https://opentelemetry.io/docs/instrumentation/go/libraries/)
Build and run:
```bash
(cd otel-http && go build . && ./otel-http)
```Test by curl:
```bash
curl http://127.0.0.1:8094
```## Usage: otel-mysql
Example for [mysql](https://opentelemetry.io/registry/?language=go&component=instrumentation)
Run mysql in docker:
```bash
docker run --rm -e MYSQL_ROOT_HOST=% -e MYSQL_ROOT_PASSWORD=12345678 -p 13306:3306 mysql/mysql-server:latest
```Please test by:
```bash
mysql -uroot --host=127.0.0.1 --port=13306 -p12345678 -e 'select CURRENT_TIMESTAMP'
```Build and run:
```bash
(cd otel-mysql && go build . && ./otel-mysql)
```Test by curl:
```bash
curl http://127.0.0.1:8095
```## Usage: otel-baggage
Example for [baggage](https://opentelemetry.io/docs/concepts/signals/baggage/)
Build and run:
```bash
(cd otel-baggage-server && go build . && ./otel-baggage-server)
(cd otel-baggage && go build . && ./otel-baggage)
```Or run simple server for baggage:
```bash
(cd otel-baggage-server2 && go build . && ./otel-baggage-server2)
(cd otel-baggage && go build . && ./otel-baggage)
```