Skip to content

Conversation

@xBlaz3kx
Copy link
Contributor

Duplicate of #343

Proposed changes

Based on my feature request in #334, I added support for OCPP-J and Websocket server metrics.

Caution

Watch out for a breaking change: Go version updated to 1.22, because the OTel SDKs require at least 1.22.

  • Metrics support via OpenTelemetry SDK
  • Added OCPPJ server metrics
    • Dispatcher metrics (inflight and per client queue sizes)
    • Inbound/outbound requests
    • (WIP) ping-pong duration per client
  • Added websocket metrics
    • Connected clients
    • Message rate (per client)
  • Updated examples, so observabilty/metrics can be configured via env variables
  • Updated docker-compose files for both TLS and non-tls examples so observability can be configured
  • Added makefile commands so deploying examples is easier

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of
them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before
merging your code.

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

Further comments

List of things that should be noted/addressed in the future:

  1. In the example, OpenTelemetry SDK exports metrics via insecure GRPC only
  2. Havent added websocket request rate metric, which could be useful
  3. Potential Tracing integration? Out of scope for now
  4. ~~Currently, OCPPJ and websocket error metrics are not handled properly, as this is a proof of concept. ~~
  5. Documentation update

@xBlaz3kx xBlaz3kx closed this Aug 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant