Get Started
Environments
Environment is a string dimension on telemetry and an optional catalog entry for deployments. Use it to filter production vs staging — Mydle never invents an environment when emitters omit one.
production when you do not set default_environment. Override per event or in the SDK.What environments are
In Mydle, “environment” appears in two related forms:
- Telemetry tag — a string field on log entries, traces / spans, browser events, and some monitor job metadata (for example
production,staging). - Deployment environment — a named catalog row (
deployment_environments) with kindproduction,staging,development,preview, orcustom, used by Deployment Intelligence.
Why tag them
Reliability work mixes prod and non-prod constantly. Tagging environments lets explorers and impact views restrict to what you actually care about without inventing topology. Correlation still prefers explicit IDs (trace_id, session_id) over environment alone.
How tags flow
- Logs — set
environmentoncreateMydleLoggeror per event. If omitted, the sourcedefault_environmentapplies. - Traces — OTLP resource / span attributes map to stored
environment; sources also carrydefault_environment. - Browser — SDK beacons carry project / release context; environment defaults are stored with browser records (product default
productionwhen applicable). - Search — log queries accept field filters such as
environment:production(and aliasenv:).
import { createMydleLogger } from "@mydle/logs";
const logger = createMydleLogger({
apiKey: "sk_live_YOUR_SECRET_KEY",
service: "checkout",
environment: "staging",
});
logger.warn("payment gateway slow", {
environment: "staging",
labels: { region: "eu" },
});Deployment environments
When Deployment Intelligence is entitled (Pro+), workspaces can maintain deployment environment catalog entries and attach releases / deployment events to them. List via authenticated API GET /environments (Enterprise API access) or the product UI when the surface is enabled.
Deployment records are observed CI/CD events only — Mydle does not invent deploy history.
Config
- Log / trace source
default_environmentin the product when creating a source - SDK options:
environmenton@mydle/logs;releaseon@mydle/browser-sdk - OpenTelemetry resource attributes for deployment environment on OTLP ingest — see OpenTelemetry
Limits
- Environment is a filter dimension, not a separate billable product line.
- Deployment Intelligence requires Pro+ (
deployment_intelligence). - Exact max count of deployment environment rows per workspace: Not currently published.
- Allowed custom environment string length / charset: Not currently published.
Failures
- Filtering on an environment that emitters never set yields an honest empty result set.
- Mismatched tags (for example logs
stagingvs tracesprod) do not auto-merge — fix emitters or widen filters. - Deployment catalog kinds outside the enum are not inventable; use
customfor nonstandard names.