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

Convert drive-kotlin to an agent plugin. #3

Merged
merged 1 commit into from
Mar 14, 2023

Conversation

alecthomas
Copy link
Collaborator

$ ftl serve ./drive-kotlin/src/main/kotlin/com/squareup/ftldemo
...

$ ftl list
com.squareup.ftldemo.notifyCustomer
com.squareup.ftldemo.makePizza
com.squareup.ftldemo.pay
$ ftl call com.squareup.ftldemo.notifyCustomer '{"recipient": "Dhanji"}'
{"message":"OK"}

@alecthomas alecthomas requested a review from dhanji as a code owner March 14, 2023 12:15
@alecthomas alecthomas force-pushed the aat/drive-kotlin-drive-service branch 2 times, most recently from 2eebade to 619dd2a Compare March 14, 2023 12:54
Copy link
Contributor

@dhanji dhanji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amazeballs

    $ ftl serve ./drive-kotlin/src/main/kotlin/com/squareup/ftldemo
    ...

    $ ftl list
    com.squareup.ftldemo.notifyCustomer
    com.squareup.ftldemo.makePizza
    com.squareup.ftldemo.pay
    $ ftl call com.squareup.ftldemo.notifyCustomer '{"recipient": "Dhanji"}'
    {"message":"OK"}
@alecthomas alecthomas force-pushed the aat/drive-kotlin-drive-service branch from 619dd2a to 5653937 Compare March 14, 2023 22:42
@alecthomas alecthomas merged commit 12b0800 into main Mar 14, 2023
@alecthomas alecthomas deleted the aat/drive-kotlin-drive-service branch March 14, 2023 22:52
deniseli added a commit that referenced this pull request Jul 31, 2024
These are just the basic metrics. Queue depth up-down counters should
come next

```
ScopeMetrics #3
ScopeMetrics SchemaURL: 
InstrumentationScope ftl.async_call 

Metric #0
Descriptor:
     -> Name: ftl.async_call.acquired
     -> Description: the number of times that the controller tries acquiring an async call
     -> Unit: 1
     -> DataType: Sum
     -> IsMonotonic: true
     -> AggregationTemporality: Cumulative

NumberDataPoints #0
Data point attributes:
     -> ftl.async_call.origin: Str(sub:echo.sub)
     -> ftl.async_call.time_since_scheduled_at_ms: Int(24)
     -> ftl.async_call.verb.ref: Str(echo.echoSinkOne)
     -> ftl.module.name: Str(echo)
     -> ftl.status.succeeded: Bool(true)
StartTimestamp: 2024-07-31 00:33:53.897947 +0000 UTC
Timestamp: 2024-07-31 00:34:08.898478 +0000 UTC
Value: 1

Metric #1
Descriptor:
     -> Name: ftl.async_call.executed
     -> Description: the number of times that the controller tries executing an async call
     -> Unit: 1
     -> DataType: Sum
     -> IsMonotonic: true
     -> AggregationTemporality: Cumulative

NumberDataPoints #0
Data point attributes:
     -> ftl.async_call.origin: Str(sub:echo.sub)
     -> ftl.async_call.time_since_scheduled_at_ms: Int(41)
     -> ftl.async_call.verb.ref: Str(echo.echoSinkOne)
     -> ftl.module.name: Str(echo)
     -> ftl.status.succeeded: Bool(true)
StartTimestamp: 2024-07-31 00:33:53.897952 +0000 UTC
Timestamp: 2024-07-31 00:34:08.898485 +0000 UTC
Value: 1

Metric #2
Descriptor:
     -> Name: ftl.async_call.completed
     -> Description: the number of times that the controller tries completing an async call
     -> Unit: 1
     -> DataType: Sum
     -> IsMonotonic: true
     -> AggregationTemporality: Cumulative

NumberDataPoints #0
Data point attributes:
     -> ftl.async_call.origin: Str(sub:echo.sub)
     -> ftl.async_call.time_since_scheduled_at_ms: Int(46)
     -> ftl.async_call.verb.ref: Str(echo.echoSinkOne)
     -> ftl.module.name: Str(echo)
     -> ftl.status.succeeded: Bool(true)
StartTimestamp: 2024-07-31 00:33:53.897956 +0000 UTC
Timestamp: 2024-07-31 00:34:08.898487 +0000 UTC
Value: 1
```

When a call fails, it looks like:
```
Metric #1
Descriptor:
     -> Name: ftl.async_call.executed
     -> Description: the number of times that the controller tries executing an async call
     -> Unit: 1
     -> DataType: Sum
     -> IsMonotonic: true
     -> AggregationTemporality: Cumulative

NumberDataPoints #0
Data point attributes:
     -> ftl.async_call.execution.failure_mode: Str(async call failed)
     -> ftl.async_call.origin: Str(sub:echo.sub)
     -> ftl.async_call.time_since_scheduled_at_ms: Int(16)
     -> ftl.async_call.verb.ref: Str(echo.echoSinkOne)
     -> ftl.module.name: Str(echo)
     -> ftl.status.succeeded: Bool(false)
StartTimestamp: 2024-07-31 00:41:26.013892 +0000 UTC
Timestamp: 2024-07-31 00:41:41.014946 +0000 UTC
Value: 1
```

Issue: #2194

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
jonathanj-square added a commit that referenced this pull request Jul 31, 2024
This change introduces the following runner metrics:

* `ftl.runner.startup.failures`
* `ftl.runner.registration.heartbeats`
* `ftl.runner.failures`

Metric output from local run:

---

ScopeMetrics #1
ScopeMetrics SchemaURL:
InstrumentationScope ftl.runner

Metric #0
Descriptor:
     -> Name: ftl.runner.registration.heartbeats
     -> Description: the number of successful runner (re-)registrations
     -> Unit:
     -> DataType: Sum
     -> IsMonotonic: true
     -> AggregationTemporality: Cumulative

NumberDataPoints #0
Data point attributes:
     -> ftl.deployment.key: Str(unknown)
     -> ftl.runner.state.name: Str(reserved)
StartTimestamp: 2024-07-30 23:15:10.131588 +0000 UTC
Timestamp: 2024-07-30 23:15:55.135067 +0000 UTC
Value: 4

NumberDataPoints #1
Data point attributes:
     -> ftl.deployment.key: Str(dpl-echo-32feoiv4rvtuqc66)
     -> ftl.runner.state.name: Str(assigned)
StartTimestamp: 2024-07-30 23:15:10.131588 +0000 UTC
Timestamp: 2024-07-30 23:15:55.135067 +0000 UTC
Value: 39

NumberDataPoints #2
Data point attributes:
     -> ftl.deployment.key: Str(dpl-time-2qb3im47gl8zgfb0)
     -> ftl.runner.state.name: Str(assigned)
StartTimestamp: 2024-07-30 23:15:10.131588 +0000 UTC
Timestamp: 2024-07-30 23:15:55.135067 +0000 UTC
Value: 39

NumberDataPoints #3
Data point attributes:
     -> ftl.deployment.key: Str(unknown)
     -> ftl.runner.state.name: Str(idle)
StartTimestamp: 2024-07-30 23:15:10.131588 +0000 UTC
Timestamp: 2024-07-30 23:15:55.135067 +0000 UTC
Value: 119

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
deniseli added a commit that referenced this pull request Jul 31, 2024
…_to_complete` (#2221)

Printout showing the exact latency value is the same on the counter attr
and on the hist metric itself:
```
Metric #2
Descriptor:
     -> Name: ftl.async_call.completed
     -> Description: the number of times that the controller tries completing an async call
     -> Unit: 1
     -> DataType: Sum
     -> IsMonotonic: true
     -> AggregationTemporality: Cumulative

NumberDataPoints #0
Data point attributes:
     -> ftl.async_call.origin: Str(sub:echo.sub)
     -> ftl.async_call.time_since_scheduled_at_ms: Int(39)
     -> ftl.async_call.verb.ref: Str(echo.echoSinkOne)
     -> ftl.module.name: Str(echo)
     -> ftl.status.succeeded: Bool(true)
StartTimestamp: 2024-07-31 18:54:35.526397 +0000 UTC
Timestamp: 2024-07-31 18:55:10.527278 +0000 UTC
Value: 1

Metric #3
Descriptor:
     -> Name: ftl.async_call.ms_to_complete
     -> Description: duration in ms to complete an async call, from the earliest time it was scheduled to execute
     -> Unit: ms
     -> DataType: Histogram
     -> AggregationTemporality: Cumulative

HistogramDataPoints #0
Data point attributes:
     -> ftl.async_call.origin: Str(sub:echo.sub)
     -> ftl.async_call.verb.ref: Str(echo.echoSinkOne)
     -> ftl.module.name: Str(echo)
     -> ftl.status.succeeded: Bool(true)
StartTimestamp: 2024-07-31 18:54:35.526402 +0000 UTC
Timestamp: 2024-07-31 18:55:10.527279 +0000 UTC
Count: 1
Sum: 39.000000
Min: 39.000000
Max: 39.000000
```

Issue: #2194
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.

2 participants