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

Bump golang.org/x/net from 0.6.0 to 0.7.0 in /examples/echo #1

Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 5, 2023

Bumps golang.org/x/net from 0.6.0 to 0.7.0.

Commits
  • 8e2b117 http2/hpack: avoid quadratic complexity in hpack decoding
  • 547e7ed http2: avoid referencing ResponseWrite.Write parameter after returning
  • 39940ad html: parse comments per HTML spec
  • See full diff in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](golang/net@v0.6.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
@alecthomas alecthomas merged commit 8fbc84b into main Mar 7, 2023
@alecthomas alecthomas deleted the dependabot/go_modules/examples/echo/golang.org/x/net-0.7.0 branch March 7, 2023 23:01
deniseli added a commit that referenced this pull request Jul 16, 2024
…utput (#2078)

Part 3 of #2020 

This PR injects newlines between blocks in `just otel-stream`'s docker
container output. We should ideally add
[color](https://www.unix.com/unix-for-dummies-questions-and-answers/134824-using-sed-change-specific-words-color.html)
+ bolding to this as well, which can be done by piping to a very similar
`sed` command, but moving forward without that for now to save time.

Example snippet of the output:
```
Metric #2
Descriptor:
     -> Name: rpc.server.response.size
     -> Description: Measures size of RPC response messages (uncompressed).
     -> Unit: By
     -> DataType: Histogram
     -> AggregationTemporality: Cumulative

HistogramDataPoints #0
Data point attributes:
     -> rpc.grpc.status_code: Int(0)
     -> rpc.method: Str(Ping)
     -> rpc.service: Str(xyz.block.ftl.v1.VerbService)
     -> rpc.system: Str(grpc)
StartTimestamp: 2024-07-16 00:02:17.426033 +0000 UTC
Timestamp: 2024-07-16 00:02:37.427409 +0000 UTC
Count: 1
Sum: 0.000000
Min: 0.000000
Max: 0.000000

ExplicitBounds #0: 0.000000

ExplicitBounds #1: 5.000000

ExplicitBounds #2: 10.000000
```
wesbillman pushed a commit that referenced this pull request Jul 23, 2024
Instrument our first metric. Next: check if this metric pipes through to
DD correctly.

Locally, the output via `just otel-stream` looks like:
```
ScopeMetrics #1
ScopeMetrics SchemaURL: 
InstrumentationScope ftl.call 

Metric #0
Descriptor:
     -> Name: requests
     -> Description: Count of FTL verb calls via the controller
     -> Unit: 
     -> DataType: Sum
     -> IsMonotonic: true
     -> AggregationTemporality: Cumulative

NumberDataPoints #0
Data point attributes:
     -> ftl.module.name: Str(time)
     -> ftl.verb.name: Str(time)
StartTimestamp: 2024-07-23 00:25:50.782759 +0000 UTC
Timestamp: 2024-07-23 00:25:59.069408 +0000 UTC
Value: 1

NumberDataPoints #1
Data point attributes:
     -> ftl.module.name: Str(echo)
     -> ftl.verb.name: Str(echo)
StartTimestamp: 2024-07-23 00:25:50.782759 +0000 UTC
Timestamp: 2024-07-23 00:25:59.069408 +0000 UTC
Value: 1
	{"kind": "exporter", "data_type": "metrics", "name": "debug"}
2024-07-23T00:26:00.745Z	info	MetricsExporter	{"kind": "exporter", "data_type": "metrics", "name": "debug", "resource metrics": 1, "metrics": 10, "data points": 15}
2024-07-23
T00:26:00.745Z	info	ResourceMetrics #0
Resource SchemaURL: https://opentelemetry.io/schemas/1.25.0
Resource attributes:
     -> service.name: Str(echo)
     -> service.version: Str(HEAD)
     -> telemetry.sdk.language: Str(go)
     -> telemetry.sdk.name: Str(opentelemetry)
     -> telemetry.sdk.version: Str(1.27.0)
```

Interestingly, it looks like the metric logging races in a slightly
inconsistent way. If you call a verb that calls another verb, you would
expect just one verb to get bumped to 1 first, and then the other verb.
Sometimes, it does behave that way. However, other times, the first time
it appears in `otel-stream` _will already_ be with both verbs. So
essentially, there is no guarantee that transient values actually show
up in the stream, but the ultimate value will be correct.

This does appear the report the correct count in even error cases. e.g.
I tried calling `echo` before the deploy was done, so that the verb call
would fail without calling out to `time`. It would correctly log a
single call in that case. And if you made another successful call
afterwards, the metric would correctly increment to include both
successful calls.
deniseli added a commit that referenced this pull request Jul 30, 2024
Implement `ftl.pubsub.published` and `ftl.pubsub.subscriber.called`

```
ScopeMetrics #0
ScopeMetrics SchemaURL: 
InstrumentationScope ftl.pubsub 

Metric #0
Descriptor:
     -> Name: ftl.pubsub.published
     -> Description: the number of times that an event is published to a topic
     -> Unit: 1
     -> DataType: Sum
     -> IsMonotonic: true
     -> AggregationTemporality: Cumulative

NumberDataPoints #0
Data point attributes:
     -> ftl.module.name: Str(echo)
     -> ftl.pubsub.topic.name: Str(echotopic)
StartTimestamp: 2024-07-30 00:53:26.173902 +0000 UTC
Timestamp: 2024-07-30 00:53:41.175052 +0000 UTC
Value: 1

Metric #1
Descriptor:
     -> Name: ftl.pubsub.subscriber.called
     -> Description: the number of times that a pubsub event has been enqueued to asynchronously send to a subscriber
     -> Unit: 1
     -> DataType: Sum
     -> IsMonotonic: true
     -> AggregationTemporality: Cumulative

NumberDataPoints #0
Data point attributes:
     -> ftl.module.name: Str(echo)
     -> ftl.pubsub.subscriber.sink.ref: Str(echo.echoSinkOne)
     -> ftl.pubsub.subscription.ref: Str(echo.sub)
     -> ftl.pubsub.topic.name: Str(echotopic)
StartTimestamp: 2024-07-30 00:53:26.173906 +0000 UTC
Timestamp: 2024-07-30 00:53:41.175069 +0000 UTC
Value: 1
```

PubSub design doc for reference: https://hackmd.io/@ftl/HyDTmzMdp
Issue: #2194

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
deniseli added a commit that referenced this pull request Jul 30, 2024
- Adds `ftl.status.succeeded` attr to `ftl.pubsub.published` metric
- Adds separate subscription and subscriber `module.name` attrs to all
metrics except `.published`
- Adds `ftl.pubsub.propagation.failed` metric

Success case:
```
ScopeMetrics #0
ScopeMetrics SchemaURL: 
InstrumentationScope ftl.pubsub 

Metric #0
Descriptor:
     -> Name: ftl.pubsub.published
     -> Description: the number of times that an event is published to a topic
     -> Unit: 1
     -> DataType: Sum
     -> IsMonotonic: true
     -> AggregationTemporality: Cumulative

NumberDataPoints #0
Data point attributes:
     -> ftl.module.name: Str(echo)
     -> ftl.pubsub.topic.name: Str(echotopic)
     -> ftl.status.succeeded: Bool(true)
StartTimestamp: 2024-07-30 20:42:41.054792 +0000 UTC
Timestamp: 2024-07-30 20:43:01.055944 +0000 UTC
Value: 1

Metric #1
Descriptor:
     -> Name: ftl.pubsub.sink.called
     -> Description: the number of times that a pubsub event has been enqueued to asynchronously send to a subscriber
     -> Unit: 1
     -> DataType: Sum
     -> IsMonotonic: true
     -> AggregationTemporality: Cumulative

NumberDataPoints #0
Data point attributes:
     -> ftl.pubsub.sink.module.name: Str(echo)
     -> ftl.pubsub.sink.ref: Str(echo.echoSinkOne)
     -> ftl.pubsub.subscription.module.name: Str(echo)
     -> ftl.pubsub.subscription.ref: Str(echo.sub)
     -> ftl.pubsub.topic.name: Str(echotopic)
StartTimestamp: 2024-07-30 20:42:41.054797 +0000 UTC
Timestamp: 2024-07-30 20:43:01.055965 +0000 UTC
Value: 1
```

Publish error case:
```
Metric #0
Descriptor:
     -> Name: ftl.pubsub.published
     -> Description: the number of times that an event is published to a topic
     -> Unit: 1
     -> DataType: Sum
     -> IsMonotonic: true
     -> AggregationTemporality: Cumulative

NumberDataPoints #0
Data point attributes:
     -> ftl.module.name: Str(echo)
     -> ftl.pubsub.publish.error.message: Str(test error)
     -> ftl.pubsub.topic.name: Str(echotopic)
     -> ftl.status.succeeded: Bool(false)
StartTimestamp: 2024-07-30 20:49:19.294421 +0000 UTC
Timestamp: 2024-07-30 20:49:44.294924 +0000 UTC
Value: 1
```

Progressing subscribers error case with subscriber defined:
```
Metric #1
Descriptor:
     -> Name: ftl.pubsub.propagation.failed
     -> Description: the number of times that subscriptions fail to progress
     -> Unit: 1
     -> DataType: Sum
     -> IsMonotonic: true
     -> AggregationTemporality: Cumulative

NumberDataPoints #0
Data point attributes:
     -> ftl.pubsub.propagation.failed_operation: Str(BeginConsumingTopicEvent)
     -> ftl.pubsub.sink.module.name: Str(echo)
     -> ftl.pubsub.sink.ref: Str(echo.echoSinkOne)
     -> ftl.pubsub.subscription.module.name: Str(echo)
     -> ftl.pubsub.subscription.ref: Str(echo.sub)
     -> ftl.pubsub.topic.name: Str(echotopic)
StartTimestamp: 2024-07-30 20:46:45.475043 +0000 UTC
Timestamp: 2024-07-30 20:47:00.476169 +0000 UTC
Value: 4
```

Progressing subscribers error case without subscriber:
```
Metric #1
Descriptor:
     -> Name: ftl.pubsub.propagation.failed
     -> Description: the number of times that subscriptions fail to progress
     -> Unit: 1
     -> DataType: Sum
     -> IsMonotonic: true
     -> AggregationTemporality: Cumulative

NumberDataPoints #0
Data point attributes:
     -> ftl.pubsub.propagation.failed_operation: Str(GetNextEventForSubscription)
     -> ftl.pubsub.subscription.module.name: Str(echo)
     -> ftl.pubsub.subscription.ref: Str(echo.sub)
     -> ftl.pubsub.topic.name: Str(echotopic)
StartTimestamp: 2024-07-30 19:09:10.084914 +0000 UTC
Timestamp: 2024-07-30 19:09:25.086338 +0000 UTC
Value: 4
```

Issue: #2194

---------

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
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>
jonathanj-square added a commit that referenced this pull request Jul 31, 2024
deniseli added a commit that referenced this pull request Aug 1, 2024
Previously, only `ftl.pubsub.published` had the caller attribute. This
PR adds caller to the rest of the pubsub metrics and also slightly
restructures the topic name/ref logging to be more consistent with the
rest of this file

```
Metric #0
Descriptor:
     -> Name: ftl.pubsub.published
     -> Description: the number of times that an event is published to a topic
     -> Unit: 1
     -> DataType: Sum
     -> IsMonotonic: true
     -> AggregationTemporality: Cumulative

NumberDataPoints #0
Data point attributes:
     -> ftl.module.name: Str(echo)
     -> ftl.pubsub.publish.caller.verb.ref: Str(echo.Echo)
     -> ftl.pubsub.topic.ref: Str(echo.echotopic)
     -> ftl.status.succeeded: Bool(true)
StartTimestamp: 2024-08-01 01:19:43.556864 +0000 UTC
Timestamp: 2024-08-01 01:20:08.558236 +0000 UTC
Value: 1

Metric #1
Descriptor:
     -> Name: ftl.pubsub.sink.called
     -> Description: the number of times that a pubsub event has been enqueued to asynchronously send to a subscriber
     -> Unit: 1
     -> DataType: Sum
     -> IsMonotonic: true
     -> AggregationTemporality: Cumulative

NumberDataPoints #0
Data point attributes:
     -> ftl.pubsub.publish.caller.verb.ref: Str(echo.Echo)
     -> ftl.pubsub.sink.module.name: Str(echo)
     -> ftl.pubsub.sink.ref: Str(echo.echoSinkOne)
     -> ftl.pubsub.subscription.module.name: Str(echo)
     -> ftl.pubsub.subscription.ref: Str(echo.sub)
     -> ftl.pubsub.topic.module.name: Str(echo)
     -> ftl.pubsub.topic.ref: Str(echo.echotopic)
```

Issue: #2194
jonathanj-square added a commit that referenced this pull request Aug 2, 2024
Adds controller and runner deployment metrics.

* `ftl.deployments.controller.reconciliation.failures`
* `ftl.deployments.controller.reconciliations.active`
* `ftl.deployments.controller.replicas.added`
* `ftl.deployments.runner.failures`
* `ftl.deployments.runner.active`

Sample output captured here

---

```
ScopeMetrics #4
ScopeMetrics SchemaURL:
InstrumentationScope ftl.deployments.controller

Metric #0
Descriptor:
     -> Name: ftl.deployments.controller.reconciliations.active
     -> Description: the number of active deployment reconciliation tasks
     -> Unit:
     -> DataType: Sum
     -> IsMonotonic: false
     -> AggregationTemporality: Cumulative

NumberDataPoints #0
Data point attributes:
     -> ftl.deployment.key: Str(dpl-echo-4xty4b1iks6plwgj)
     -> ftl.module.name: Str(echo)
StartTimestamp: 2024-08-01 18:41:42.628275 +0000 UTC
Timestamp: 2024-08-01 18:42:07.631714 +0000 UTC
Value: 0

NumberDataPoints #1
Data point attributes:
     -> ftl.deployment.key: Str(dpl-time-4d23618ccc6mwce8)
     -> ftl.module.name: Str(time)
StartTimestamp: 2024-08-01 18:41:42.628275 +0000 UTC
Timestamp: 2024-08-01 18:42:07.631714 +0000 UTC
Value: 0

Metric #1
Descriptor:
     -> Name: ftl.deployments.controller.replicas.added
     -> Description: the number of runner replicas added (or removed) by the deployment reconciliation tasks
     -> Unit:
     -> DataType: Sum
     -> IsMonotonic: true
     -> AggregationTemporality: Cumulative

NumberDataPoints #0
Data point attributes:
     -> ftl.deployment.key: Str(dpl-echo-4xty4b1iks6plwgj)
     -> ftl.module.name: Str(echo)
StartTimestamp: 2024-08-01 18:41:42.628278 +0000 UTC
Timestamp: 2024-08-01 18:42:07.631714 +0000 UTC
Value: 1

NumberDataPoints #1
Data point attributes:
     -> ftl.deployment.key: Str(dpl-time-4d23618ccc6mwce8)
     -> ftl.module.name: Str(time)
StartTimestamp: 2024-08-01 18:41:42.628278 +0000 UTC
Timestamp: 2024-08-01 18:42:07.631714 +0000 UTC
Value: 1
```

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
deniseli added a commit that referenced this pull request Aug 6, 2024
)

Replaces the original toy `requests` metric with `ftl.call.requests` and
adds a new `ftl.async_call.ms_to_complete` histogram metric. Latency
attribute is bucketed by powers of 2, rather than 8 as async calls are,
because (1) direct verb calls should be faster and (2) this is a new
metric, so while we know less about realistic production values, it's
better to err on the side of more granularity.

```
InstrumentationScope ftl.call 

Metric #0
Descriptor:
     -> Name: ftl.call.requests
     -> Description: the number of times that the FTL controller receives a verb call request
     -> Unit: 1
     -> DataType: Sum
     -> IsMonotonic: true
     -> AggregationTemporality: Cumulative

NumberDataPoints #0
Data point attributes:
     -> ftl.call.run_time_ms.bucket: Str([8,16))
     -> ftl.call.verb.ref: Str(time.time)
     -> ftl.module.name: Str(time)
     -> ftl.status.succeeded: Bool(true)
StartTimestamp: 2024-08-06 19:50:37.269674 +0000 UTC
Timestamp: 2024-08-06 19:51:17.271013 +0000 UTC
Value: 1

NumberDataPoints #1
Data point attributes:
     -> ftl.call.run_time_ms.bucket: Str([32,64))
     -> ftl.call.verb.ref: Str(echo.echo)
     -> ftl.module.name: Str(echo)
     -> ftl.status.succeeded: Bool(true)
StartTimestamp: 2024-08-06 19:50:37.269674 +0000 UTC
Timestamp: 2024-08-06 19:51:17.271013 +0000 UTC
Value: 1

Metric #1
Descriptor:
     -> Name: ftl.async_call.ms_to_complete
     -> Description: duration in ms to complete a verb call
     -> Unit: ms
     -> DataType: Histogram
     -> AggregationTemporality: Cumulative

HistogramDataPoints #0
Data point attributes:
     -> ftl.call.verb.ref: Str(echo.echo)
     -> ftl.module.name: Str(echo)
     -> ftl.status.succeeded: Bool(true)
StartTimestamp: 2024-08-06 19:50:37.269677 +0000 UTC
Timestamp: 2024-08-06 19:51:17.271014 +0000 UTC
Count: 1
Sum: 32.000000
Min: 32.000000
Max: 32.000000
```

Sample output when a verb call fails:
```
     -> ftl.call.failure_mode: Str(invalid request: missing verb)
     -> ftl.call.run_time_ms.bucket: Str(<1)
     -> ftl.call.verb.ref: Str(echo.echo)
     -> ftl.module.name: Str(echo)
     -> ftl.status.succeeded: Bool(false)
```

Issue: #2194

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
deniseli added a commit that referenced this pull request Aug 6, 2024
whoops

```
Metric #1
Descriptor:
     -> Name: ftl.call.ms_to_complete
     -> Description: duration in ms to complete a verb call
     -> Unit: ms
     -> DataType: Histogram
     -> AggregationTemporality: Cumulative

HistogramDataPoints #0
Data point attributes:
     -> ftl.call.verb.ref: Str(echo.echo)
     -> ftl.module.name: Str(echo)
     -> ftl.status.succeeded: Bool(true)
StartTimestamp: 2024-08-06 21:59:38.317129 +0000 UTC
Timestamp: 2024-08-06 22:00:33.317447 +0000 UTC
Count: 1
Sum: 17.000000
Min: 17.000000
Max: 17.000000
```

Issue: #2194
jonathanj-square added a commit that referenced this pull request Aug 12, 2024
…ce condition.

issue #1
the waitgroup used to await event processing completion is not synchronized with event handling completion. The waitgroup has its count synchronously incremented before the event gets published but the down tick is not explicitly synchronized with handler completion. The down tick occurs in `handlePubSubEvent` in response to a `publishEvent` signal - this signals the intention to distribute an event on a topic not the completion. The `subscriptionDidConsumeEvent` is the right event to target. Given the event is dispatched via a goroutine the race condition may or may not trigger failure depending on competition execution timings.

issue #2
event synchronization needs to consider the subscription topology in order to account for non-linear event propagation networks

remaining issue
synchronous event propagation from the subscriber verb is covered but not asynchronous propagation (e.g. a scenario where a verb spawns a goroutine that delays before writing an event to another topic might fire the event after the waitgroup reaches zero)
github-merge-queue bot pushed a commit that referenced this pull request Aug 12, 2024
```
InstrumentationScope ftl.ingress 

Metric #0
Descriptor:
     -> Name: ftl.ingress.requests
     -> Description: the number of ingress requests that the FTL controller receives
     -> Unit: 1
     -> DataType: Sum
     -> IsMonotonic: true
     -> AggregationTemporality: Cumulative

NumberDataPoints #0
Data point attributes:
     -> ftl.ingress.method: Str(GET)
     -> ftl.ingress.path: Str(/http/echo)
     -> ftl.ingress.run_time_ms.bucket: Str([16,32))
     -> ftl.ingress.verb.ref: Str(echo.getEcho)
     -> ftl.module.name: Str(echo)
StartTimestamp: 2024-08-12 17:44:51.923107 +0000 UTC
Timestamp: 2024-08-12 17:45:26.923594 +0000 UTC
Value: 1

Metric #1
Descriptor:
     -> Name: ftl.ingress.ms_to_complete
     -> Description: duration in ms to complete an ingress request
     -> Unit: ms
     -> DataType: Histogram
     -> AggregationTemporality: Cumulative

HistogramDataPoints #0
Data point attributes:
     -> ftl.ingress.method: Str(GET)
     -> ftl.ingress.path: Str(/http/echo)
     -> ftl.ingress.verb.ref: Str(echo.getEcho)
     -> ftl.module.name: Str(echo)
StartTimestamp: 2024-08-12 17:44:51.92311 +0000 UTC
Timestamp: 2024-08-12 17:45:26.923622 +0000 UTC
Count: 1
Sum: 27.000000
Min: 27.000000
Max: 27.000000
```

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
gak pushed a commit that referenced this pull request Aug 13, 2024
```
InstrumentationScope ftl.ingress 

Metric #0
Descriptor:
     -> Name: ftl.ingress.requests
     -> Description: the number of ingress requests that the FTL controller receives
     -> Unit: 1
     -> DataType: Sum
     -> IsMonotonic: true
     -> AggregationTemporality: Cumulative

NumberDataPoints #0
Data point attributes:
     -> ftl.ingress.method: Str(GET)
     -> ftl.ingress.path: Str(/http/echo)
     -> ftl.ingress.run_time_ms.bucket: Str([16,32))
     -> ftl.ingress.verb.ref: Str(echo.getEcho)
     -> ftl.module.name: Str(echo)
StartTimestamp: 2024-08-12 17:44:51.923107 +0000 UTC
Timestamp: 2024-08-12 17:45:26.923594 +0000 UTC
Value: 1

Metric #1
Descriptor:
     -> Name: ftl.ingress.ms_to_complete
     -> Description: duration in ms to complete an ingress request
     -> Unit: ms
     -> DataType: Histogram
     -> AggregationTemporality: Cumulative

HistogramDataPoints #0
Data point attributes:
     -> ftl.ingress.method: Str(GET)
     -> ftl.ingress.path: Str(/http/echo)
     -> ftl.ingress.verb.ref: Str(echo.getEcho)
     -> ftl.module.name: Str(echo)
StartTimestamp: 2024-08-12 17:44:51.92311 +0000 UTC
Timestamp: 2024-08-12 17:45:26.923622 +0000 UTC
Count: 1
Sum: 27.000000
Min: 27.000000
Max: 27.000000
```

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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