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

Map BlockId to corresponding Session - Add session id to trace #326

Open
jlewi opened this issue Oct 25, 2024 · 1 comment
Open

Map BlockId to corresponding Session - Add session id to trace #326

jlewi opened this issue Oct 25, 2024 · 1 comment

Comments

@jlewi
Copy link
Owner

jlewi commented Oct 25, 2024

I don't think we have a great way right now to map a block back to its session.
Here's the BlockLog proto

message BlockLog {

We keep track of the generate trace id but we can't map the generate trace id back to the session.
The trace should probably have a session id corresponding to its session

message Trace {

I think a work around is to query the logs.

@jlewi
Copy link
Owner Author

jlewi commented Oct 25, 2024

Example query

gcloud logging read "logName=\"projects/foyle-dev/logs/foyle\" AND jsonPayload.message=\"Agent.Generate\" AND jsonPayload.traceId=\"0233d9db2c290bbccca0e1d14dc0d9c7\"" --freshness=7d

Use that to get the streamTraceId

You can then query for the logs using the streamTraceId.

gcloud logging read "logName=\"projects/foyle-dev/logs/foyle\" AND jsonPayload.message=\"Received full context\" AND jsonPayload.traceId=\"a5389130309ce9f7d9be9f3a6be9da0d\"" --freshness=7d

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

No branches or pull requests

1 participant