https://github.com/soontao/opentelemetry-cds
opentelemetry support for CDS nodejs runtime
https://github.com/soontao/opentelemetry-cds
cds opentelemetry
Last synced: 6 months ago
JSON representation
opentelemetry support for CDS nodejs runtime
- Host: GitHub
- URL: https://github.com/soontao/opentelemetry-cds
- Owner: Soontao
- License: other
- Created: 2022-06-18T08:29:13.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-12T20:49:32.000Z (over 1 year ago)
- Last Synced: 2024-04-14T05:02:09.126Z (over 1 year ago)
- Topics: cds, opentelemetry
- Language: TypeScript
- Homepage:
- Size: 1.69 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# OpenTelemetry for CDS
[](https://www.npmjs.com/package/opentelemetry-cds)

[](https://github.com/Soontao/opentelemetry-cds/actions/workflows/nodejs.yml)> `OpenTelemetry` support for `CDS nodejs runtime`
## How to use it
> install this package firstly
```bash
npm i -S opentelemetry-cds
```> start cds runtime with `opentelemetry-cds` module
```json
{
"scripts": {
"start": "otlp-cds-serve"
}
}
```## Instruments
- [x] EventHandlers
- [x] EventContext/Event/Request
- [x] register (on/once/before)
- [x] emit
- [x] OData Adapter
- [x] `process`
- [x] `execute`
- [x] `createOdataService`
- [x] async task via `cds.spawn`
- [x] CDS Compiler
- [x] edm/edmx/edm.all/edmx.all
- [ ] Messaging
- [x] cds-nats
- [ ] rfc
- [ ] cds.MessagingService
- [x] Database
- [x] sqlite3 (`Database`.`run`/`prepare`/`all`/`get`)
- [x] hdb `Client`.`exec`/`prepare`/`commit`/`rollback`
- [x] third-party instrumentations
- [x] net
- [x] dns
- [x] mysql
- [x] http## Features
- [x] instrumentations
- [ ] cloud foundry support
- [ ] k8s support
- [ ] environment variables
- [x] `otlp-cds-serve` command## Configuration
> opentelemetry-cds is using `opentelemetry-http` protocol as exporter, just ref [@opentelemetry/exporter-trace-otlp-http](https://www.npmjs.com/package/@opentelemetry/exporter-trace-otlp-http) document to configure it by environment
```bash
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
```### Local Setup
> view the trace in a local jaeger server
1. [Download Jaeger Binary for your OS](https://www.jaegertracing.io/download/)
1. Extract it
1. Run it with otlp enabled flag
1. Start your cds application with `npx otlp-cds-serve````bash
./jaeger-all-in-one --collector.otlp.enabled
# windows
# jaeger-all-in-one.exe --collector.otlp.enabled
```## Screenshots
> batch operations

> cross service call

> async message broker

## [CHANGELOG](./CHANGELOG.md)
## [LICENSE](./LICENSE)