All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- resolveAll to
MineWinsConflictsResolver
to handle an array of conflicts.
- Avoid using async/await with then callbacks
- Bump semver from 5.7.1 to 5.7.2
- @auth: Validate token's
account
scope - Delete Metadata client
- Add option to save asynchronous cache
- Add handler name for runtime http handlers
- Return type for the saveJSON method of VBase client
- Increase timeout for messagesGraphQL client
- Add disk cache steps and retry count to tracing
- Stop updating client cache when revalidated and still expired
- Allow disabling memoization for all requests of a client
- Fix metrics being restricted by tracing restrictions
6.45.22 - 2023-09-20
- Remove reference of how to search for the app's errors on now-defunct Splunk.
- Error tracing spans not logging the details.
6.45.21 - 2023-09-19
- Fix tracingMiddleware shouldTrace decision
- Fix HttpClient tracing based on sampling decision
6.45.21-beta.2 - 2023-09-19
6.45.21-beta.1 - 2023-09-07
6.45.21-beta.0 - 2023-09-04
6.45.21-beta - 2023-09-04
6.45.20 - 2023-08-30
- Remove sampling decision from runtime
- Only create tracing spans when they come from router
6.45.20-beta - 2023-08-30
- Bump
graphql-upload
version
- Metrics to prometheus
- Bump
prom-client
version
6.45.15 - 2023-02-01
- Removed unnecessary worker signal logs
6.45.14 - 2023-02-01
- New tests for
MineWinsConflictsResolver
.
- Merged/Rebased content not being returned causing inconsistencies.
- Do not return empty content if no conflict is found.
6.45.13 - 2022-12-12
- Deterministic cache for getWithBody
- Remove socket metrics per origin
- Update sensitive fields list.
- Remove "error" field.
- Add missing fields.
- Add where parameter to the MasterData scroll method
- Update sensitive fields.
- Add 'authorization', rawheaders', 'x-vtex-credential' and 'x-vtex-session'.
- Lowercase fields before comparison in cleanJson.
- Fix cleanJson utility.
- Remove only cookie fields when cleaning logs.
- Remove sensitive data from logs.
vtex_segment
cookie extraction
- Extract session cookie in a safe manner
Missing x-vtex-provider header
log.
- Cover new test cases where mine is left equal to base and master updates an item.
- Export Prometheus client
@metric
GraphQL directive
- Update axios to
0.21.1
- Update schema in runtime when provider app changes version
- [startWorker] Remove duplicated middleware
- [Rate Limit] Enable user to config the amount of requests to be processed per minute and concurrently by setting it in
service.json
.
- Fix prometheus metrics being publicly exposed on /metrics.
- Added an interface to the
userTranslations
query of the MessagesGraphQL client.
getAppState
method toregistry
client
- Increase HTTP agents connection pools freeSockets and lifetime
TranslateTo
schema directive.translations
util.- README's
Development with IO clients
directions.
- Moved the
TranslatableMessageV2
interface,parseTranslatableStringV2
,formatTranslatableStringV2
andhandleSingleString
methods andCONTEXT_REGEX
,FROM_REGEX
andCONTENT_REGEX
constants from theTranslatableV2
schema directive to thetranslations
util. - README's
Development
section format.
- Add logs to MineWinsConflictResolver
searchDocumentsWithPaginationInfo
on Masterdata client
- Allow sending events to any resource
- Set wait time to force shutdown workers based on service timeout
- Stop removing response from error.
- Update @vtex/node-error-report to remove sensitive information from errors logged to splunk and to distributed tracing.
- Remove sensitive information from headers before logging onto tracing spans.
- Remove sensitive exception data before responding to browser.
- [metric] Created new Prometheus metrics related to Event Loop Lag between scrapes:
- runtime_event_loop_lag_max_between_scrapes_seconds
- runtime_event_loop_lag_percentiles_between_scrapes_seconds
timestamp
field to VTEX IO Billing log.
- [metrics] Export jaeger metrics.
- [metrics] Typo on event listened to increment
runtime_http_aborted_requests_total
. - [tracing:entrypoint] Fix waiting for response stream to finish.
- [metrics] Create new Prometheus exported metrics:
- runtime_http_requests_total
- runtime_http_aborted_requests_total
- runtime_http_requests_duration_milliseconds
- runtime_http_response_size_bytes
- [tracing] Finish entrypoint span when response finishes streaming.
- Update
billingOptions
type.
- Remove fallback to x-vtex-credential as adminUserAuthToken.
- Send workspace to session service.
- Add channelPrivacy to SegmentData type.
- [clients:tracing] Create span wrapping HttpClient middlewares with information on caching and retries.
- [tracing] Remove span wrapping user middlewares.
- [tracing] Add entrypoint span tags and logs after the execution of middlewares.
- [ErrorReport] Do not allow creating recursive ErrorReports.
- Release the 6.31.0 again due to issues.
- Add
putRaw
method on HttpClient. - Support to
If-Match
header usage on VBase client.
- [ErrorReport] Log ErrorReport errors created on
HttpClient
requests or thrown by user handlers to splunk. - [ErrorReport] Add error metadata on span logs instead of on span tags.
- [tracing:entrypoint] Log incoming request headers and outgoing response headers.
- [tracing] Use remote sampling.
- [tracing:entrypoint] Fix URL tag on entrypoint span - use
ctx.request.href
instead ofctx.request.originalUrl
. - Masterdata sort typing and scroll pagination.
- Remove
serverTiming
metrics from client headers. - Add
serverTiming
metrics on error report.
- Masterdata client
- Create an option to disable conditional segment/session vary
- Set vary: x-vtex-session if the scope is private
- [ErrorReport] Update
@vtex/node-error-report
package:- Clone objects before sanitizing them.
- [ErrorReport] Use
@vtex/node-error-report
package.
- [tracing:logger] Make Logger serializable again.
- [tracing:init] Increase sampling rate to 5%.
- [ErrorReport] Serialize buffer only as a
byteCount
and atype: buffer
. - [ErrorReport] Increase ErrorReport serialization depth from 6 to 8.
- [tracing:entrypoint-span] Add
vtex.request_id
tag. - [ErrorReport] Add
error.server.code
,error.server.source
,error.server.request_id
to tags added to error spans. - [response:headers] Add
x-trace-id
when request is traced. - [logger] Log
trace-id
when request is traced. - [tracing:tags] Use snake case to conform with OpenTracing.
- Settings from settings builder to events.
- Tracing utilities export.
NODE_ENV
tag to process tracing tags.tracingConfig
argument to all clients request functions.- Option on request spans to define if request is childOf rootSpan or followsFrom it.
- Option on request span to add suffix on request span name - it will be
http-request:suffx
. - Helper
createTracingContextFromCarrier
to allow worker threads and child processes to be traced.
- Extensions field to graphql client.
- Adds missing
@
in BillingMetrics client
- [tracing] Fix
ErrorReport
object strings truncating (StackOverflow error in some cases). - [tracing] Make
ctx.vtex.tracer
a required field onIOContext
.
- [tracing] Add
fallbackSpanContext
method toUserLandTracer
.
- Workspaces sharing apps metainfo.
- Bump version.
- Send events using
Courier
instead ofColossus
.
- Trace only 1% of the requests.
- Tracing instrumentation.
- Updated
Billing Options
types
- Apps' Install API response type
- Skidder topic names on logs are not based on account anymore
- Fixed params for VBase list
- createHttpsAgent helper function so devs can import it in their apps and use our agent
- httpsAgent added to instanceOptions so we can add the agent in the client's constructor
- Https interceptor agent
- Support for a external schema to be passed into graphql Service configuration.
- Get
adminUserAuthToken
from headerX-Vtex-Credential
.
- Adds stale while revalidating to apps get meta infos function
- Injects
__SKIDDER_TOPIC_1
and__SKIDDER_TOPIC_2
keys in logs
- Exponential timeout and backoff variables can now be set by request and not only by client.
- Fix revalidation for cached buffer responses.
- Removes slowRecorder from code
- Payment Provider client
- Fix
x-vtex-etag-control
set by SmartCacheDirective.
- Add support for router binding header.
- Adds catalog Graphql client to IOClients
- Make it usable outside of IO
- Adds
catalogGraphQL
client
- Export tenant data
- Update axios from 0.18.0 to 0.19.2
- getAppsMetaInfos typings from Apps client
- Improve
cacheKey
performance and sort params in the key.
- Adds new query to messages client
- Uses new resolver in Translatable resolver
- Increase query size limit from 1mb to 3mb.
- Settings format is now the same delivered by settings server.
- New settings middleware.
- New directive in graphql for declaring route settings type.
- Encodes Buffer with base64 to cache it correctly
@deprecated
directive logs to Splunk when used. To avoid overflowing splunk with useless logs, we only log once at every minute
- Parameters to customize exponential backoff delay and increase timeout at each retry.
- Stop using
axios-retry
logic, implement retry manually.
- Vbase
getJSON
typings. Do not return type{}
- Do not rely on state for flushing
x-vtex-meta
headers
- Enables fast recorder
- Sets
x-vtex-meta
header ONCE in therecorder
middleware to tackle performance issues
- Internal app path log in toolbelt
- Allow getting segment data with default locale and currency from binding instead of tenant.
- New route to get files from Apps with only the app name, account and workspace
- Logic to get cancellable methods for cancellation token
- There was a HUGE performance drop when setting
x-vtex-meta
header viactx.set
using an array. Joining in a single string solved the problem
- Batches messages to be translated
- Added correct getFile function to Assets client
- When linking only one worker will be available
- Gracefull shutdown when receiving
sigterm
from master and child processes
- Remote debugger now debugs worker instead of master process
- @transltableV2 directive arguments
- Add binding to context when receiving header
- Public routes now working
- Splunk log in clients to console.log only
- Flag
fireEvent
in MessagessaveV2
should be optional
- Checks if logger.warn is a function before calling it
- Add binding information to HttpClient requests
- Conflicts Resolver only use
comparableKeys
when objects owns them
- Allows filter dependencies from app list
- New attribute to messages API
- Uses http in old routes
- Error type
TooManyRequestsError
that returns status code 429
- Uses https if request is from outside IO
- Updates internal routing
- Update Messages SaveArgsV2 interface
- Removes
ctx.graphql
object sharing and make it have a request cycle duration
- Upgrades new error query format for splunk 72
- Fix "socket hang up" by preventing client request abortion after server response is finished or client response is completed.
- Fix cancellation error not being thrown if the request does not have metric.
- Removes tracing from graphqlruntime
- stale getAppFile accepts MAJOR.x app name
- Handle nullable nested objects in MineWinsConflictsResolver
- Export error type RequestCancelledError in index
- New scalar type and directive to sanitize strings
- Handle error without response in VBase getJSON calls
- Throw error in
getAppsMetaInfos
method if `staleIfError`` is false.
- Handle nullable arrays passed to MineWinsConflictsResolver
- Correctly handle errors caused by requests cancelled with cancellation token
- environment arg to
JanusClient
.
- Apps install accepts
infra:service-*
apps
- New getAppMetaInfos function with diskCache fallback
- Add MineWinsConflict resolver logic to VBase client
- New getAppFiles with fallback strategies
- Messages Save v2 interface
- Warnings logged as errors
- Tenant client added
- Logger client instantiated in service-node
@translatableV2
directive uses language from context instead of making an IO
- TranslatableV2 support for context and from in message encoding
- Resolve context in message at directive translatableV2
- Add saveV2 method in MessagesGraphQL client
- Add host to IOContext
- Forward x-forwarded-host header.
- Add vary x-forwarded-host.
- Add
platform
toctx
- Export list of all available public domains
- Added logger middleware to events pipeline.
- Route for testing apps on
builder-hub
.
- Update missing changelog.
- Remove if statements on existence of ctx.vtex.logger
- Fix ramda typings errors.
- Add parameter
skipSemVerEnsure
in app publish.
- Create event handler similar to http requests, providing vtex clients, timings and error logs.
- Stop ignoring 0ms metrics.
- Rename GraphQL middlewares to resolve metrics conflict.
- Stop measuring event-loop overhead.
- Truncate long GraphQL errors so they can be sent to Splunk.
- Deprecate Colossus logger completely, using stdout instead.
- Properly times metrics, considering total elapsed and code run after
await next()
. - Avoid broken metrics when a middleware throws.
- Do not batch metrics for unsuccessful handlers and middlewares.
- Rename
http-handler-success-*
tohttp-handler-*
and only count non-success statuses.
- Disable caching if response varies with session. (Before, we incorrectly disabled caching if we had a session token)
- Typo on segment path.
- Inside the class
Translatable
, allowstring
arrays to be translated too.
- Use POST requests for queries only in the
MessagesGraphQL
client, not in theGraphQLClient
.
- Create middleware that deletes headers passed to make cache behavior consistent regarldess of CDN.
getAccountData
now requires to pass the paramVtexIdclientAutCookie
.
- Accept
VtexIdclientAutCookie
as param togetAccountData
.
- Revert changes made in release 3.31.0.
- Function to check resource access in License Manager Client
- Do not separate messages
translate
queries in batches. Instead, use a single POST request for all translations.
- Http head request
- VBase get file metadata
- Removal of circular references in logs.
- Problem with
recorder
insidecontext
- Assure thatrecorder
is insidecontext
at the right moment.
- Fixes
Please use a named function as handler for better metrics
warnings
- Propagate
x-vtex-session
across requests.
- Enable environment selection, e.g beta, when cookie
vtex-commerce-env
is set
- Typings for Free and Paid Billing Options
- Typings for Fixed and Metric-Based Calculation Items
- Type guards for Billing Options
- Generate
manifest.json
schema from TypeScript definition.
- GraphQL Client
- Change type of
buildFeatures
toRecord<string, string[]>
- Made query string param serialization
repeat
by default. This means arrays, which were previously encoded as e.g.files[]=a&files[]=b
becomefiles=a&files=b
.
- Implement Settings client for
vtex.settings-server
.
- Add "buildFeatures" inside "manifest".
- Add caller, params and query to error logs
- Relax error typing and capture stack automatically
- Usage of
routes.Links
function in theroutes.Unlink
function (Apps client)
- Add
adminUserAuthToken
(from cookieVtexIdclientAutCookie
) andstoreUserAuthToken
(from cookieVtexIdclientAutCookie_${account}
) toctx.vtex
- Add LicenseManager client
- Add Session client
- Restructure HttpClient
- Implement IOClient
- Implement IOClient subclasses
- Port all native clients
- Reduced default timeout to 1s
- Added default
params
to HttpClient
- Add native error and warning classes and log these appropriately.
- Fixed host reference for Billing metrics sending
- Messages
saveTransalation
method
- Security hole as
Authorization
,Proxy-Authorization
andvtexIdClientAutCookie
headers were being sent to graphql errors
segment.getSegment
andsegment.getSegmentByToken
- Option
forceMaxAge
option toHttpClient
request config. This allows certain requests to forceably be cached forforceMaxAge
seconds, regardless of the responses'Cache-control
header, as long as status is 200.
- Makes errors compliant to apollo's specification
- Makes it possible to use graphql handler with a scary warning
- Added type inference for
IOClients.getOrSet
method. No need to type instantiations like
export class IOClients {
public get logger(): Logger {
return this.getOrSet('logger', Logger)
}
}
You can just do
export class IOClients {
public get logger() {
return this.getOrSet('logger', Logger)
}
}
instead
- Expose more details on all errors (e.g. operationId, requestId, query source, variables).
- Conflate 2xx and 5xx status labels to success and error respectively.
- Adds
graphql-operation
metric that considers if any resolver had errors, with two dimensions: success and error - Logs each resolver error individually and add request information
- Stop logging successful route handlers
- Add single hardcoded retry for sending error logs
- Prepare for
graphql
route id (deprecating__graphql
) - Disallow declaration of
graphql
as http route handler
- tsErrorsAsWarnings parameter for the
linkApp
andrelinkApp
methods of theBuilder
class
- Implement new Service() wrapper and port graphql route generation from service-runtime-node.
- Add production dimension to all metrics
- Remove production from MetricsAccumulator methods and add cacheHits
- Only retry safe requests
- Add metrics for proxy timeout and retries
- Add
metric
config to clients requests - Add
concurrency
option to HttpClient to limit amount of parallel requests
- Change default retry behaviour to only retry on network error once
- Accept retryConfig on each HttpClient
- Added new required parameter to create a new workspace on Workspaces API.
- Functions that call new Apps API for dependency resolution.
- Updated App Manifest types
- segmentToken and sessionToken to IOContext type definition
- protected context in favor of private one in IODataSource
- IOContext types mismatch with service-runtime-node
- Added changelog 😬.
- Added MetricsAccumulator
- Added Metrics support in HttpClient
- Lint the whole damn thing.
- Update all dependencies.
HttpClient
now adds'Accept-Encoding': 'gzip'
header by default.