Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat: Metric endpoint #2737

Closed
wants to merge 15 commits into from

Conversation

sehz
Copy link
Contributor

@sehz sehz commented Oct 22, 2022

Expose new Metric endpoint for SPU using UnixSocket. In response to UnixSocket request, metric would be returned as simple json:

 nc -U /tmp/fluvio-spu.sock 
{
  "records_read": 6,
  "records_write": 0,
  "bytes_read": 508,
  "bytes_written": 0,
  "smartmodule": {
    "bytes_in": 166,
    "records_out": 0,
    "invocation_count": 6
  }

This implementation uses a simple atomic counters Instead of OpenTelemetry counters which are hard to reason with it. This is aggegrate counter for records and bytes. Detail counters will be added in the subsequent PR

In the Kubernetes, we get using exec:

kubectl exec fluvio-spg-main-0 -- apk add socat 
kubectl exec fluvio-spg-main-0 -- socat UNIX-CONNECT:/tmp/fluvio-spu.sock -

SPU automatically remove existing socks file if it already exists.

@sehz sehz marked this pull request as draft October 22, 2022 03:47
@sehz sehz marked this pull request as ready for review October 22, 2022 06:00
@sehz sehz added this to the 0.10.0 milestone Oct 22, 2022
@sehz sehz added SPU SPU related trouble shooting labels Oct 22, 2022
@sehz
Copy link
Contributor Author

sehz commented Oct 22, 2022

bors r+

bors bot pushed a commit that referenced this pull request Oct 22, 2022
Expose new Metric endpoint for SPU using UnixSocket.  In response to UnixSocket request, metric would be returned as simple json:
```
 nc -U /tmp/fluvio-spu.sock 
{
  "records_read": 6,
  "records_write": 0,
  "bytes_read": 508,
  "bytes_written": 0,
  "smartmodule": {
    "bytes_in": 166,
    "records_out": 0,
    "invocation_count": 6
  }
```

This implementation uses a simple atomic counters Instead of OpenTelemetry counters which are hard to reason with it. This is aggegrate counter for records and bytes.  Detail counters will be added in the subsequent PR

In the Kubernetes, we get using exec:
```
kubectl exec fluvio-spg-main-0 -- apk add socat 
kubectl exec fluvio-spg-main-0 -- socat UNIX-CONNECT:/tmp/fluvio-spu.sock -
```

SPU automatically remove existing socks file if it already exists.
@bors
Copy link

bors bot commented Oct 22, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat: Metric endpoint [Merged by Bors] - feat: Metric endpoint Oct 22, 2022
@bors bors bot closed this Oct 22, 2022
@sehz sehz deleted the metric_endpoint branch October 31, 2022 03:30
davidbeesley pushed a commit to davidbeesley/fluvio that referenced this pull request Oct 31, 2022
Expose new Metric endpoint for SPU using UnixSocket.  In response to UnixSocket request, metric would be returned as simple json:
```
 nc -U /tmp/fluvio-spu.sock 
{
  "records_read": 6,
  "records_write": 0,
  "bytes_read": 508,
  "bytes_written": 0,
  "smartmodule": {
    "bytes_in": 166,
    "records_out": 0,
    "invocation_count": 6
  }
```

This implementation uses a simple atomic counters Instead of OpenTelemetry counters which are hard to reason with it. This is aggegrate counter for records and bytes.  Detail counters will be added in the subsequent PR

In the Kubernetes, we get using exec:
```
kubectl exec fluvio-spg-main-0 -- apk add socat 
kubectl exec fluvio-spg-main-0 -- socat UNIX-CONNECT:/tmp/fluvio-spu.sock -
```

SPU automatically remove existing socks file if it already exists.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant