# Introduction


This chapter covers the parts of the Flare protocol that only apply to a browser client. Read it alongside the shared pages, which describe the payload structure itself.

## Where things live

The three ingestion endpoints and the way you encode attributes are the same for every client, whatever language it is written in. Those pages sit under **Shared by all clients** in the sidebar:

- [Entry points](/docs/protocol/general/entry-points) for saying which page or request a report belongs to.
- [Resources](/docs/protocol/general/resources) for the attributes describing your application.
- [Attribute formats](/docs/protocol/general/attribute-formats) for the OpenTelemetry value encoding.
- [Errors payload](/docs/protocol/errors/payload), [Traces payload](/docs/protocol/traces/payload) and [Logs payload](/docs/protocol/logs/payload) for the endpoints themselves.

The pages in this chapter cover what a browser does differently:

- [Sending data](/docs/protocol-javascript/general/sending-data) for the public key, the origin allowlist, timestamps and the last batch before the page closes.
- [Events](/docs/protocol-javascript/general/events) for the browser span types and their attributes.
- [Attributes](/docs/protocol-javascript/errors/attributes) for the page context on an error report.
- [Sourcemaps](/docs/protocol-javascript/errors/sourcemaps) for turning minified stack frames back into readable ones.
- [Lifecycle](/docs/protocol-javascript/traces/lifecycle), [Web vitals](/docs/protocol-javascript/traces/web-vitals) and [Aggregations](/docs/protocol-javascript/traces/aggregations) for how browser traces are shaped and grouped.

## What a browser does differently

The key is public. A browser cannot keep a secret, so a browser client sends with the project's public key, and the project decides which domains may use it.

A page view is the unit of work. Traces are rooted in a page load or a client-side navigation instead of a request or a job.

Some data shows up after the trace has closed. Core Web Vitals are not final when the page finishes loading, so they go out later, in a second request, on a span backdated to the page's start.

The route pattern takes work. A server framework knows its route from routing. In the browser you either get a pattern out of the router or you fall back to the raw path, and you record which one happened.

Stack frames are minified. Column numbers and a source map version are what make them readable again.

## Building a client

Implement the errors, traces and logs endpoints, then follow the attribute conventions in this chapter and in the shared pages.

The span types here are shaped around what a browser can actually observe. If your framework needs a span type or a grouping that does not exist yet, [send us a mail](mailto:support@flareapp.io) and we will look at adding it.
