skywalking icon indicating copy to clipboard operation
skywalking copied to clipboard

[Feature] About log collecting and meter(Metrics) reports skywalking-rust.

Open jmjoy opened this issue 3 years ago • 4 comments

Search before asking

  • [X] I had searched in the issues and found no similar feature requirement.

Description

Mentioned in https://github.com/apache/skywalking/issues/9297#issuecomment-1188532431, the features of the next version of skywalking-rust.

Use case

No response

Related issues

No response

Are you willing to submit a PR?

  • [X] Yes I am willing to submit a PR!

Code of Conduct

jmjoy avatar Jul 26 '22 01:07 jmjoy

Is the log collecting means Span::add_log?

If yes, it's already done.

jmjoy avatar Jul 26 '22 01:07 jmjoy

No, it isn't. Log collecting mean logs with trace context could be reported through grpc log API. It is less expensive than including in spans. Also, you would be able to search logs without trace ID.

wu-sheng avatar Jul 26 '22 03:07 wu-sheng

For logging, I want to implement it by integrate with the tokio log framework tracing, add the grpc subscriber and some filed in log, such as:

// The GrpcSubscriber implement `tracing::Subscriber`.
let subscriber = skywalking::logging::GrpcSubscriber::new();

tracing::subscriber::set_global_default(subscriber);

let trace_context = create_the_trace_context();

info!("some log", skywalking.ctx = trace_context);

Because tracing is not only a log framework, but also a trace framework, so in the future, I want to integrate skywalking Tracer with tracing, like tracing-opentelemetry.

jmjoy avatar Aug 01 '22 04:08 jmjoy

You could create APIs fot native logging/tracing integration, and provide a shell on the APIs for tokio tracing. This would be helpful to set up APIs boundaries.

wu-sheng avatar Aug 01 '22 04:08 wu-sheng

Add logging: https://github.com/apache/skywalking-rust/pull/41

jmjoy avatar Aug 11 '22 12:08 jmjoy

I have some doubts about metric, where will the metric data be displayed on the UI?

jmjoy avatar Aug 20 '22 02:08 jmjoy

I have some doubts about metric, where will the metric data be displayed on the UI?

Nearly all data on the pages? You need to follow MAL to pre-process metrics

  • https://skywalking.apache.org/docs/main/latest/en/concepts-and-designs/mal/
  • https://skywalking.apache.org/docs/main/latest/en/setup/backend/backend-meter/

wu-sheng avatar Aug 20 '22 02:08 wu-sheng

You could take a look for k8s, virtual machine(linux), and MySQL server monitoring.

wu-sheng avatar Aug 20 '22 03:08 wu-sheng

You could take a look for k8s, virtual machine(linux), and MySQL server monitoring.

:ok_hand:

jmjoy avatar Aug 20 '22 03:08 jmjoy

Log APIs - https://github.com/apache/skywalking-rust/pull/41 Metrics APIs - https://github.com/apache/skywalking-rust/pull/44

wu-sheng avatar Aug 25 '22 06:08 wu-sheng

For logging, I want to implement it by integrate with the tokio log framework tracing, add the grpc subscriber and some filed in log, such as:

// The GrpcSubscriber implement `tracing::Subscriber`.
let subscriber = skywalking::logging::GrpcSubscriber::new();

tracing::subscriber::set_global_default(subscriber);

let trace_context = create_the_trace_context();

info!("some log", skywalking.ctx = trace_context);

Because tracing is not only a log framework, but also a trace framework, so in the future, I want to integrate skywalking Tracer with tracing, like tracing-opentelemetry.

Sorry to bother you but do we have any tokio tracing subscriber layer implemente by now? Is there any hint if I want to intergrate skywallking-rust with tokio tracing?

4t145 avatar Mar 21 '24 08:03 4t145

For logging, I want to implement it by integrate with the tokio log framework tracing, add the grpc subscriber and some filed in log, such as:

// The GrpcSubscriber implement `tracing::Subscriber`.
let subscriber = skywalking::logging::GrpcSubscriber::new();

tracing::subscriber::set_global_default(subscriber);

let trace_context = create_the_trace_context();

info!("some log", skywalking.ctx = trace_context);

Because tracing is not only a log framework, but also a trace framework, so in the future, I want to integrate skywalking Tracer with tracing, like tracing-opentelemetry.

Sorry to bother you but do we have any tokio tracing subscriber layer implemente by now? Is there any hint if I want to intergrate skywallking-rust with tokio tracing?

What is that tracing doing? If it only does pure tracing such as Zipkin, I am afraid, that is not enough for SkyWalking's requirements.

wu-sheng avatar Mar 21 '24 08:03 wu-sheng

Tokio tracing is the most widely used trace framework in the Rust world. I'am not demanding that the crate skywalking-rust to support tokio tracing. I ask because the creator of this issue jmjoy mentioned that he was thinking about to integrate crate skywalking-rust with tokio tracing there like what tracing-opentelemetry do (maybe it's a new crate named tracing-skywalking). Since opentelemetry has been well supported in tokio traicng I wonder if there is the same thing in skywalking.

4t145 avatar Mar 21 '24 08:03 4t145

Tokio tracing is the most widely used trace framework in the Rust world. I'am not demanding that the crate skywalking-rust to support tokio tracing. I ask because the creator of this issue jmjoy mentioned that he was thinking about to integrate crate skywalking-rust with tokio tracing there like what tracing-opentelemetry do (maybe it's a new crate named tracing-skywalking). Since opentelemetry has been well supported in tokio traicng I wonder if there is the same thing in skywalking.

That is a new thing. But at least, this is not a thing we discussed here.

wu-sheng avatar Mar 21 '24 08:03 wu-sheng