vanus-labs / vanus

Vanus is a Serverless, event streaming system with processing capabilities. It easily connects SaaS, Cloud Services, and Databases to help users build next-gen Event-driven Applications.
https://vanus.ai
Apache License 2.0
2.29k stars 113 forks source link

feat: support event tracing #607

Open hwjiangkai opened 1 year ago

hwjiangkai commented 1 year ago

What problem does this PR solve?

support event tracing

enable related configurations in the gateway and trigger:

    observability:
      tracing:
        enable: false
        # OpenTelemetry Collector endpoint, https://opentelemetry.io/docs/collector/getting-started/
        otel_collector: http://127.0.0.1:4318
        event_tracing_enable: true
        # Vanus Controller endpoints
        event_collector: 
          - vanus-controller-0.vanus-controller.trace.svc.cluster.local:8080
          - vanus-controller-1.vanus-controller.trace.svc.cluster.local:8080
        eventbus: event-tracing

Issue Number: close #xxx

Problem Summary

What is changed and how does it work?

Check List

Tests

codecov[bot] commented 1 year ago

Codecov Report

Merging #607 (daa31f6) into main (ee76217) will decrease coverage by 3.00%. The diff coverage is 45.93%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/vanus-labs/vanus/pull/607/graphs/tree.svg?width=650&height=150&src=pr&token=RSXSIMEY4V&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs)](https://app.codecov.io/gh/vanus-labs/vanus/pull/607?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs) ```diff @@ Coverage Diff @@ ## main #607 +/- ## ========================================== - Coverage 57.07% 54.07% -3.00% ========================================== Files 190 224 +34 Lines 15191 18125 +2934 ========================================== + Hits 8670 9801 +1131 - Misses 5884 7534 +1650 - Partials 637 790 +153 ``` | [Impacted Files](https://app.codecov.io/gh/vanus-labs/vanus/pull/607?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs) | Coverage Δ | | |---|---|---| | [internal/controller/trigger/storage/storage.go](https://app.codecov.io/gh/vanus-labs/vanus/pull/607?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs#diff-aW50ZXJuYWwvY29udHJvbGxlci90cmlnZ2VyL3N0b3JhZ2Uvc3RvcmFnZS5nbw==) | `0.00% <ø> (ø)` | | | [...al/controller/trigger/subscription/subscription.go](https://app.codecov.io/gh/vanus-labs/vanus/pull/607?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs#diff-aW50ZXJuYWwvY29udHJvbGxlci90cmlnZ2VyL3N1YnNjcmlwdGlvbi9zdWJzY3JpcHRpb24uZ28=) | `58.29% <ø> (-0.28%)` | :arrow_down: | | [...rnal/controller/trigger/validation/subscription.go](https://app.codecov.io/gh/vanus-labs/vanus/pull/607?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs#diff-aW50ZXJuYWwvY29udHJvbGxlci90cmlnZ2VyL3ZhbGlkYXRpb24vc3Vic2NyaXB0aW9uLmdv) | `62.64% <ø> (ø)` | | | [internal/controller/trigger/worker/manager.go](https://app.codecov.io/gh/vanus-labs/vanus/pull/607?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs#diff-aW50ZXJuYWwvY29udHJvbGxlci90cmlnZ2VyL3dvcmtlci9tYW5hZ2VyLmdv) | `85.76% <ø> (+0.83%)` | :arrow_up: | | [internal/controller/trigger/worker/policy.go](https://app.codecov.io/gh/vanus-labs/vanus/pull/607?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs#diff-aW50ZXJuYWwvY29udHJvbGxlci90cmlnZ2VyL3dvcmtlci9wb2xpY3kuZ28=) | `100.00% <ø> (ø)` | | | [internal/controller/trigger/worker/scheduler.go](https://app.codecov.io/gh/vanus-labs/vanus/pull/607?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs#diff-aW50ZXJuYWwvY29udHJvbGxlci90cmlnZ2VyL3dvcmtlci9zY2hlZHVsZXIuZ28=) | `71.01% <ø> (+1.01%)` | :arrow_up: | | [internal/controller/trigger/worker/worker.go](https://app.codecov.io/gh/vanus-labs/vanus/pull/607?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs#diff-aW50ZXJuYWwvY29udHJvbGxlci90cmlnZ2VyL3dvcmtlci93b3JrZXIuZ28=) | `78.45% <ø> (-1.55%)` | :arrow_down: | | [internal/gateway/config.go](https://app.codecov.io/gh/vanus-labs/vanus/pull/607?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs#diff-aW50ZXJuYWwvZ2F0ZXdheS9jb25maWcuZ28=) | `60.60% <ø> (-0.51%)` | :arrow_down: | | [internal/gateway/gateway.go](https://app.codecov.io/gh/vanus-labs/vanus/pull/607?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs#diff-aW50ZXJuYWwvZ2F0ZXdheS9nYXRld2F5Lmdv) | `55.26% <ø> (-12.41%)` | :arrow_down: | | [internal/gateway/proxy/auth.go](https://app.codecov.io/gh/vanus-labs/vanus/pull/607?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs#diff-aW50ZXJuYWwvZ2F0ZXdheS9wcm94eS9hdXRoLmdv) | `0.00% <ø> (ø)` | | | ... and [67 more](https://app.codecov.io/gh/vanus-labs/vanus/pull/607?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs) | | ... and [67 files with indirect coverage changes](https://app.codecov.io/gh/vanus-labs/vanus/pull/607/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/vanus-labs/vanus/pull/607?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/vanus-labs/vanus/pull/607?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs). Last update [895dd83...daa31f6](https://app.codecov.io/gh/vanus-labs/vanus/pull/607?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vanus-labs).