Documentation / Connect
Data the SDKs send
For each SDK, what it sends on its own, what only when you turn it on, and what never leaves your app.
This page is written from the code of the four SDKs: JavaScript, Ruby, Python and Dart. For each one it says what leaves your app with the default settings, what leaves only when you turn it on, and what is hidden before sending. The four SDKs do not hide exactly the same fields: the differences are in the table below.
Everything goes only to the address of your installation, never to third parties. On arrival the server cleans the data again.
What never leaves
These rules hold in all four SDKs. The first two cannot be turned off:
- The value of a sensitive field. When the name of a field contains one of the words in the table below, its value leaves as
[FILTERED]. This holds for tags, context, extra data and the objects inside them. - Credentials written in a text. In error messages and log lines, a credential written as a header or after its scheme, such as
Authorization: Bearer …, is replaced with[FILTERED]. The rest of the sentence stays readable. - Who the user is. Of the user you set, only the
idleaves. Email, name and IP address leave only with the personal data switch (sendPiiorsend_pii), which is off.
A field is recognized by its name, not by its content: a card number in a field called number is not hidden. Give your fields names that say what they hold. In Ruby and Python you can add your own names with filter_parameters.
The address of the previous page is an exception to the query string rule. The SDKs remove the query string from the addresses they build, but three places send the previous page's address as the browser or the app wrote it, query string included, even with the personal data switch off: the page views of JavaScript (trackPageviews), the Referer header in Ruby and the Referer header in Dart. If your addresses carry tokens or personal data in the query string, see the notes in each SDK below.
Hidden fields, SDK by SDK
A field is hidden when its name contains the word: user_password, X-Api-Key and credit_card_number are all hidden. Ruby and Python also ignore dashes and underscores, so E-Mail counts as email.
| The name contains | JavaScript | Ruby | Python | Dart |
|---|---|---|---|---|
pass (password, passphrase, passport) | yes | yes | yes | yes |
secret, token, api_key, apikey, authorization | yes | yes | yes | yes |
cookie, csrf | yes | yes | yes | yes |
credit, card, cvv, iban, ssn | yes | yes | yes | yes |
email | yes | yes | yes | yes |
phone, telephone, mobile | no | yes | yes | yes |
dob, birth | no | yes | yes | yes |
bearer, session | no | yes | yes | yes |
pin, pan | no | yes | yes | yes |
Matching on part of the name hides more than needed: in Ruby, Python and Dart company_name contains pan and shipping contains pin, so both are hidden. It is a deliberate choice: better a hidden value than a leaked one.
Inside a text the SDKs differ too. JavaScript, Python and Dart also hide a pair written as name=value when the name is sensitive, for example password=… in an error message. Ruby hides only the Authorization header and the credentials after Bearer, Basic or Token: for the other pairs add your own patterns with scrub_message_patterns.
JavaScript
Package @bussolabs/closeyourit-js, in the browser and on Node.
On its own:
- errors: unhandled exceptions and rejected Promises, with type, message and stack trace;
- the page of the error: address without query string and fragment, the browser's User-Agent, the page the visitor came from without query string;
- the last 50 steps before the error: clicks, navigation, console messages and HTTP requests, with addresses without query string;
- the logs you write, from
infoup; - the user
id, if you set it, and the tags and context you add; - the events you send with
captureEvent, with the same fields as a page view (seetrackPageviewsbelow); - on Node only, the name of the machine (
sendServerName).
Only when you turn it on:
sendPii: in errors, the address of the page and the page the visitor came from with their whole query string, and the whole user (email, name, IP);trackPageviews: page views, without cookies, with the site name, the path without query string, the fiveutm_parameters, the screen width and the whole address of the page the visitor came from. That address keeps its query string even withsendPiioff: if the pages that link to yours carry tokens or personal data in it, remove thereferrerfield inbeforeSend;replay: the session recording. Typed fields and all the text on the page are masked unless you choose otherwise. A session cookie,cyi_replay, holds only a random code that ties the recording to the server's errors;trackWebVitals,captureResourceErrors,detectPerformanceIssues: page speed, resources that do not load (address without query string), slow or repeated calls;captureMethodArguments: the arguments of the blocks you measure withmeasure(), with sensitive names hidden;usageEnabled, on Node only: which routes and jobs really run.
If the visitor's browser asks not to be tracked, page views, events and recording stop; errors and logs keep flowing (respectDoNotTrack, on by default). In the browser the SDK never uses the secret token: with the token alone it stays off.
Ruby
Gem closeyourit-ruby, for Rails apps.
On its own:
- errors, from requests, from ActiveJob and Sidekiq jobs and from
Rails.error.report, with the stack trace and 3 lines of code around each step; - the request of the error: method, address without query string, and only the
Accept,Content-Type,User-AgentandRefererheaders. NeverAuthorizationorCookie. TheRefererleaves as the browser sent it, query string included: to leave it out, take it offrequest_header_allowlist; - the name of the machine;
- slow queries, with every value in the SQL replaced by
?, and slow methods; - background job metrics;
- the logs you write with
CloseYourIt.log, frominfoup; - which routes, jobs and keys really run, as
Controller#action, never the address; - the user
id, if you set it.
From the development and test environments it sends nothing at all.
Only when you turn it on:
send_pii: the query string, the visitor's IP address, the fields of the request body (with sensitive names hidden) and the whole user;capture_query_bindings: the values of the queries, with sensitive column names hidden;capture_method_arguments: the arguments of measured methods;capture_rails_logs: the lines ofRails.logger, fromwarnup;detect_performance_issues: N+1, too many queries, slow requests and calls;capture_console_errors: errors ofrails consoleandrails runner;propagate_trace_context: the request identifier passed on to the services you call.
Python
Package closeyourit, server side.
On its own:
- unhandled errors, with the stack trace;
- the request of the error: method, address and path without query string, and only the
Accept,Content-TypeandUser-Agentheaders; - the logs you send;
- with the SQLAlchemy integration, slow queries, with every value removed from the SQL;
- with the Celery integration, the duration of tasks; and the duration of the blocks you measure;
- the user
id, if you set it.
In the data you add, values under names such as url or referrer lose their query string, and a query string keeps its parameters with sensitive names hidden. Headers such as Authorization, Cookie, X-Forwarded-For and X-Real-IP are always hidden.
Only when you turn it on:
send_pii: the whole user;CLOSEYOURIT_USAGE_ENABLED: which routes and jobs really run;http_capture_hosts: the calls your app makes to the hosts you list, with addresses without query string;trace_propagation_enabled: the request identifier passed on to the hosts you list.
Dart
Package closeyourit, for Flutter apps.
On its own:
- unhandled exceptions, with the stack trace. Without network they are saved on the device, at most 50, and sent at the next start;
- the app and the device: app version and build, package name, model and maker of the device, whether it is a simulator, system and its version;
- HTTP requests made with Dio, once you add its interceptor: method, address without query string, and only the
Accept,Content-Type,User-AgentandRefererheaders. ARefereryour app sets leaves as written, query string included: to leave it out, take it offrequestHeaderAllowlist; - the logs you write with
CloseYourIt.log, frominfoup; - the user
id, if you set it, and the tags and context you add.
Only when you turn it on:
sendPii: the query string of requests, with sensitive parameters hidden, and the whole user. Even then, theuser:password@part of an address and the fragment never leave;captureLifecycleBreadcrumbs: when the app goes to the background and back;captureConnectivityBreadcrumbs: the type of network, never its name or address;captureTapBreadcrumbs: that a tap happened and on which screen, never what was typed;detectPerformanceIssues: interface stutter, too many rebuilds, slow or repeated calls;captureMethodArguments: the arguments of the blocks you measure;propagateTraceContext: the request identifier, only towards the hosts you list;usageEnabled: which parts of the app really run, as you mark them withCloseYourIt.used. It needs the secrettoken, so an app you distribute with thepublicKeysends nothing even with it on.
A distributed app uses the publicKey, never the secret token.