Closed hackerwins closed 3 months ago
[!WARNING]
Review failed
The pull request is closed.
This update includes a version bump for the project and the addition of a new interceptor to the API configuration. The new interceptor enhances request handling by adding custom headers using information from the package.json
file. This ensures better tracking and monitoring of API usage patterns by appending metadata to each request.
Files | Change Summary |
---|---|
package.json |
- Version updated from 0.1.0 to 0.4.23 |
src/api/index.ts |
- Added interceptor.createMetricInterceptor() to the interceptors array in the transport configuration |
src/api/interceptor.ts |
- Added import for package.json - Implemented createMetricInterceptor in InterceptorBuilder class |
sequenceDiagram
participant Client
participant InterceptorBuilder
participant Transport
participant PackageJson
Client->>InterceptorBuilder: Initialize and configure interceptors
InterceptorBuilder->>PackageJson: Import version information
InterceptorBuilder->>InterceptorBuilder: createMetricInterceptor() returns interceptor
InterceptorBuilder-->>Transport: Interceptor including 'x-yorkie-user-agent' header
Transport->>Client: Configured transport ready for use
In a land where code does flow,
A version boost, our work does show. 🌟
Headers added to requests we send,
Yorkie's user-agent, a helping friend! 🐾
Our project grows with care and might,
Making data paths both clear and bright. ✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
What this PR does / why we need it?
Add MetricInterceptor
Any background context you want to provide?
What are the relevant tickets?
Fixes #
Checklist
Summary by CodeRabbit
New Features
x-yorkie-user-agent
header for each API request.Version Update