Closed njam closed 8 years ago
Allow to pass an arbitrary string identifier when connecting to cm-janus:
/janus?context={"clientId":"foo123","userId":123}
The fields in the context should be assigned to the WebSocket connection and included in all log messages relating to this connection.
How to make it available everywhere? Having a "context" object? We can enrich that object with janus concepts like "janusSessionId" etc.
Let's do these steps:
@tomaszdurka This is very funny! As I've mentioned once in our discussion to #186 that the ws
lib, which we use for cm-janus websocket server, does not allow to access url
of incoming connection. I offered a replacement to another websocket library but you was against it. Can I do the replacement now? Should I upgrade ws
lib to have this functionality(create a custom fork of it)?
@tomaszdurka @njam here is a short draft.
@tomaszdurka @njam please compare the approaches @d68cd00 and @8057e33. What do you prefer more?
Closing in favor of #235 #236.
Via https://github.com/cargomedia/puppet-cargomedia/issues/1084
@tomaszdurka @vogdb For debugging purposes it would be good to have a common field to identify the session of a log record. Preferably that session context could be enriched when new information arrives. Maybe we can even parse the json "token" and extract the "web session id" to add it as well?
let's discuss!
Depends on #186 cause of websocket server url parsing