Comments (5)
Hey!
I have done this using Elasticsearch and APM. Can't share exact details with you, but start with replacing the Pino logger and use Elasticsearch instead.
You can log session ID, username, conversationID, requestID, and much more. You can ingest the Mongo data in Elastic too - if you need that.
from chat-ui.
Hello,
We have the logs in elastic but without replacing the Pino logger (using the filebeat, logstash).
But where can I find the username? In which log? Not able to see it in the logs to match the username with the other information.
Regards
from chat-ui.
In my case, I am logging the user details by retrieving it from the locals
variable.
transaction?.setLabel("userEmail", event.locals.user?.email ?? "unknown");
You can get sessionId
from locals
as well.
from chat-ui.
In the code above, I am basically setting the APM transaction
metadata. But you can fetch the userEmail
in a similar way and log it.
from chat-ui.
Even if you do this:
logger.debug({
...event.locals,
url: event.url.pathname,
params: event.params,
request: event.request,
message: `request for ${routeName} with status ${response.status}`,
});
You can log all the required values.
from chat-ui.
Related Issues (20)
- Unable to build via Docker: "An Error Occurred" HOT 2
- Warning: To load an ES module in Azure environment HOT 3
- "404 Resource Not Found" when using Azure OpenAI model endpoint HOT 2
- Preventing users from going to other pages during generation. HOT 3
- 400 (no body) trying to reach openai compatible server HOT 2
- [v0.9.1] Error: "Cannot resolve directory $env" HOT 2
- "Sign in with 🤗 Hugging Face" button for login modal can look strange at narrow widths HOT 2
- Adding husky to the project so it lints pre-commit HOT 2
- Error when evaluating SSR module error after following setup HOT 1
- Command-R-plus model parameters HOT 1
- huggingchat is down HOT 4
- [v0.9.1] Switch the LLM model mid-conversation? HOT 2
- [v0.9.1] Formatting issues while rendering code HOT 1
- undeclared node version depedancy HOT 2
- vllm 400 status code (no body) error
- Ollama chatPromptTemplate and parameters HOT 6
- Proxy chat-ui by nginx subpath HOT 4
- Integrate jina.ai Reader for search and website content extraction HOT 2
- Issue With OpenID
- [Contribution Request] Integrate Unify AI into Hugging Face Chat UI
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chat-ui.