feat(analytics): Google Analytics・同意モード・一部機能のトラッキング実装 (MisskeyIO#784)
This commit is contained in:
parent
2f4c48bbe6
commit
fcfd004c38
53 changed files with 805 additions and 113 deletions
|
@ -27,6 +27,7 @@ import { RateLimiterService } from './RateLimiterService.js';
|
|||
import { SigninService } from './SigninService.js';
|
||||
import type { AuthenticationResponseJSON } from '@simplewebauthn/types';
|
||||
import type { FastifyReply, FastifyRequest } from 'fastify';
|
||||
import { randomUUID } from 'node:crypto';
|
||||
|
||||
@Injectable()
|
||||
export class SigninApiService {
|
||||
|
@ -71,7 +72,7 @@ export class SigninApiService {
|
|||
reply: FastifyReply,
|
||||
) {
|
||||
const logger = this.loggerService.getLogger('api:signin');
|
||||
logger.setContext({ username: request.body.username, ip: request.ip, headers: request.headers });
|
||||
logger.setContext({ username: request.body.username, ip: request.ip, headers: request.headers, span: request.headers['x-client-transaction-id'] ?? randomUUID() });
|
||||
logger.info('Requested to sign in.');
|
||||
|
||||
reply.header('Access-Control-Allow-Origin', this.config.url);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue