Skip to content

Reproducing issue when using `autometrics` and `async-trait` together

Notifications You must be signed in to change notification settings

kykosic/autometrics-async-trait-repro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reproducing issuing autometrics along with async-trait.

Instructions

Run in sequence:

  • Terminal 1: Server
    $ cargo run
    Compiling autometrics-async-trait-repro v0.1.0
     Finished dev [unoptimized + debuginfo] target(s) in 1.75s
      Running `target/debug/autometrics-async-trait-repro`
    
  • Terminal 2: Client
    $ cargo run -- client
    Compiling autometrics-async-trait-repro v0.1.0
     Finished dev [unoptimized + debuginfo] target(s) in 0.77s
      Running `target/debug/autometrics-async-trait-repro client`
    RESPONSE=Ok(Response { metadata: MetadataMap { headers: {"content-type": "application/grpc", "date": "Thu, 30 Nov 2023 16:57:35 GMT", "grpc-status": "0"} }, message: HelloReply { message: "Hello Tonic!" }, extensions: Extensions })
    RESPONSE=Err(Status { code: Internal, message: "error!", metadata: MetadataMap { headers: {"content-type": "application/grpc", "date": "Thu, 30 Nov 2023 16:57:35 GMT", "content-length": "0"} }, source: None })
    RESPONSE=Ok(Response { metadata: MetadataMap { headers: {"content-type": "application/grpc", "date": "Thu, 30 Nov 2023 16:57:35 GMT", "grpc-status": "0"} }, message: HelloReply { message: "Hello Tonic!" }, extensions: Extensions })
    RESPONSE=Err(Status { code: Internal, message: "error!", metadata: MetadataMap { headers: {"content-type": "application/grpc", "date": "Thu, 30 Nov 2023 16:57:35 GMT", "content-length": "0"} }, source: None })
    
    
  • Terminal 3: Query
    $ curl localhost:3000/metrics | rg 'result='
    function_calls_total{function="MyGreeter::say_hello",module="autometrics_async_trait_repro",service_name="autometrics",caller_function="",caller_module="",result="",ok="",error="",objective_name="",objective_percentile=""} 4
    

About

Reproducing issue when using `autometrics` and `async-trait` together

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages