这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Conversation

@akim-bow
Copy link
Contributor

No description provided.

@linear
Copy link

linear bot commented Jan 16, 2024

log.trace(
"sending the particle %s to the created stream %s",
particle.id,
stream.id,
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe better print relayAddress here? stream.id is a very low-level thing, afaik.

log.trace("data written to sink");

log.trace(
"the particle %s have been written to the stream %s",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"the particle %s have been written to the stream %s",
"particle %s sent to %s",

and relay address here, too

Copy link
Contributor

Choose a reason for hiding this comment

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

and I think that's debug

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeap, stream.id seems redundant.
Not sure about relay address though, JS client always has a single relay address and it would spam the logs without particular benefit.

Copy link
Contributor

Choose a reason for hiding this comment

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

imagine you have several js clients


log_particle.trace(
log_particle.debug(
"id %s. executing call service handler %j",
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe show here serviceId and functionName?

req seems to have way too much info

Copy link
Contributor Author

Choose a reason for hiding this comment

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

req also contains particle context and arguments for the service call which could be important sometimes.
I tried to split the line above on 2 different logs - which does just what you say and more detailed with trace log level. Please check

Copy link
Contributor

@folex folex left a comment

Choose a reason for hiding this comment

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

Is there a log for incoming particle? Would be nice to see something like incoming particle {particle.id} from {relay.peerId}


const sink = stream.sink;

await pipe([fromString(serializeToString(particle))], encode, sink);
Copy link
Contributor

Choose a reason for hiding this comment

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

is there never an error here? 🤔 Or is there a log for particle sending error in a separate place?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, particle log for network error resides in calling class - FluencePeer

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@akim-bow
Copy link
Contributor Author

Is there a log for incoming particle? Would be nice to see something like incoming particle {particle.id} from {relay.peerId}

https://github.com/fluencelabs/js-client/blob/15f96dc5f78693ac9bb86f21b79ed035ffd97977/packages/core/js-client/src/jsPeer/FluencePeer.ts#L639C1-L639C1

@fluencebot fluencebot mentioned this pull request Jan 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

e2e Run e2e workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants