After a move from a Singapore region to a Jakarta region, most teams check where the databases, disks, and backups now live, and stop there. The logging agent, the APM tracer, and the error tracker usually come along unchanged inside the machine image, the Helm chart, or the Ansible role. They keep sending data to the same overseas endpoint as before, and that data often includes personal information: email addresses in error messages, phone numbers in query strings, customer IDs in trace attributes. Moving the compute changes none of that.
This article explains how a telemetry agent decides where to send data, why a region migration leaves that decision untouched, and how to find and redirect each export path afterwards.
Why the destination survives a migration
A telemetry agent does not know or care which region it runs in. Its destination is a string in a config file or an environment variable, such as an ingest hostname, an API URL, or a vendor site setting. When you rebuild a VM from the same image in Google Cloud asia-southeast2, AWS ap-southeast-3, or Azure Indonesia Central, that string is copied byte for byte. The agent starts, reads the same endpoint, and connects to the same place.
Cloud-native agents can behave in a less obvious way. Some take the target region from instance metadata, while others carry a region value that was written explicitly during the original setup in Singapore. If the old value was hard-coded, the agent in Jakarta keeps writing into the Singapore logging service, and it works without any error. Nothing in the agent's logs looks wrong, because from its point of view nothing is wrong.
The same applies to containers. An OTEL_EXPORTER_OTLP_ENDPOINT variable, the standard OpenTelemetry setting for where traces and metrics go, lives in the deployment manifest. Redeploying the manifest into a new cluster keeps the old endpoint.
How a log line travels from your app to an overseas endpoint
It helps to follow one log line through a typical file-tailing agent such as Fluent Bit or the OpenTelemetry Collector's file receiver. The details vary per agent, but the stages are similar.
- The application writes a line to stdout or to a log file. On systemd hosts, stdout goes to journald. In Kubernetes, the container runtime writes it to a file under
/var/log/containers/or/var/log/pods/. - The agent watches the file, usually through inotify, a kernel interface that tells a process when a file changes. It reads the new bytes and records how far it has read in a position or checkpoint file, so a restart does not resend everything.
- The agent parses the line and enriches it with hostname, pod name, labels, and sometimes cloud metadata. The record now carries more context than the application wrote.
- Records go into an in-memory batch. Many agents can also spill batches to an on-disk buffer when the destination is slow or unreachable. That buffer is a local copy of the data waiting to leave.
- When a batch is full or a flush timer fires, the agent resolves the endpoint hostname through DNS, opens a TCP connection, performs a TLS handshake that includes the hostname in the SNI field (Server Name Indication, the hostname the client asks for during the handshake), and sends the compressed batch over HTTP or gRPC.
- The connection is usually kept open and reused. DNS is looked up again only when the connection drops or the cached answer expires.
Stage 6 matters during an audit. Because the connection is long-lived, a short DNS capture can miss an agent that resolved its endpoint hours ago. You need to look at both established connections and new lookups.
APM tracers follow the same pattern from inside the application process. The tracer library hooks into the HTTP framework and database driver, builds spans (timed records of one operation, like one SQL query or one outbound HTTP call), batches them, and ships them to a local agent or directly to the vendor. Error trackers capture exceptions together with request context and send them out in the same way.
What personal data rides along
Teams often think of telemetry as CPU graphs and status codes, so it is easy to forget what ends up inside it. APM spans for database calls can include the SQL statement text, and depending on driver settings, the parameter values too. HTTP spans record full URLs, so a password reset link or a ?phone= parameter goes out intact. Error trackers can attach request headers, cookies, form bodies, and the logged-in user's email. Application logs contain whatever a developer printed while debugging and never removed.
In support work, this is usually the part that surprises people. The database is in Jakarta and encrypted, but its contents appear piece by piece in an overseas trace store with a different retention period and a different access list.
Finding every export path on a host
Start from what the host is actually doing on the network, then match it to configuration. Network evidence shows real behavior, and config only shows intent.
List established outbound connections with the owning process, then watch for new DNS lookups and TLS hostnames:
# Established TCP connections with process names (needs root to see all processes)
sudo ss -tnp state established
# Watch DNS queries leaving the host for a while; long-lived connections may not re-resolve
sudo tcpdump -ni any -l 'udp port 53 or tcp port 53'
# Show the hostname requested in each TLS handshake (SNI), if tshark is installed
sudo tshark -i any -Y 'tls.handshake.type == 1' -T fields -e ip.dst -e tls.handshake.extensions_server_name
The ss output gives you a process name and a remote IP for every connection. Agents usually stand out by name. The SNI capture turns IPs into vendor hostnames, which often contain a region hint. Restarting an agent during the capture forces a fresh DNS lookup and handshake, but do that only where a restart is acceptable. If an SDK uses DNS-over-HTTPS or Encrypted Client Hello, these captures can miss the hostname, so treat an empty result as "not seen" rather than "not happening".
Next, match connections to configuration. Paths differ by agent, package, and distro, so adjust the directories to what is installed:
# Read-only search for destination settings in common agent config locations
sudo grep -rEn 'endpoint|host|url|site|region' /etc/otelcol* /etc/fluent-bit /etc/td-agent-bit 2>/dev/null
# OpenTelemetry and vendor variables set for running processes
sudo grep -az 'OTEL_EXPORTER_OTLP' /proc/*/environ 2>/dev/null | tr '\0' '
' | sort -u
In Kubernetes, the agents usually run as DaemonSets and the tracer settings sit in Deployment environment variables:
kubectl get daemonsets -A
kubectl get deployments -A -o yaml | grep -En 'OTEL_|ENDPOINT|_SITE|_HOST'
Keep the resulting inventory simple. For each export path, write down the process, the data type (logs, traces, metrics, errors), the destination hostname, and where that hostname is configured.
Paths that never touch your servers
Some export paths start outside the hosts, so the network captures above cannot see them.
Frontend monitoring and RUM (real user monitoring) scripts run in the visitor's browser and send data straight from the user's device to the vendor. You find them in the page source and in the browser's network tab, not on the server.
Managed cloud logging has its own routing layer. A log sink or router can forward entries to a bucket, topic, or project in another region, and the default storage location for logging buckets may not follow the compute region. Check the location of every log bucket and the destination of every sink or export rule in the console or CLI for your provider. This is the logging counterpart of the replication problem described in Database di Jakarta tapi Backup Otomatis ke Singapura? Cek Setting Replikasi Region.
CI/CD runners and managed functions are also easy to forget. Build logs often contain environment dumps, and serverless functions in a leftover Singapore project may still run and log.
Redirecting and proving it
Each export path has three realistic options. You can point it to an in-country ingest endpoint if your vendor offers one; check the vendor's documentation and contract rather than assuming, because availability and storage location differ by product. You can send everything to a collector you run inside the Jakarta region and store the data in-region. Or you can keep the overseas destination for data that carries no personal information, and remove personal fields at a collector before export.
A single in-region collector usually makes the audit easier. Applications and agents send to one internal address, and only the collector's config decides what leaves the region. Redaction rules then live in one place instead of in every service.
When you change an endpoint, two leftovers are easy to miss. On-disk buffers can still hold undelivered batches for the old destination, and a restarted agent may flush them overseas before it reads the new config. Check where each agent keeps its buffer and how it handles old chunks before switching. Old data already stored at the vendor also stays there until its retention expires or you request deletion.
After the change, repeat the same ss, DNS, and SNI captures and confirm the overseas hostnames are gone. Save the before-and-after output with timestamps. Auditors ask for that evidence, as covered in Sovereign Cloud Deployed but No Data Residency Proof for Auditors? Verify Locality Step by Step. For a stronger control, add an egress rule that allows outbound traffic only to approved telemetry destinations, so a newly deployed agent with an old default fails visibly instead of quietly shipping data abroad.
The practical rule: when you move a region, treat every agent's endpoint as data that has to migrate too. Inventory the export paths from network evidence, redirect or redact each one, flush the buffers, and keep the captures that show the traffic now stays in Indonesia.