Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,12 @@ is JSON); `tags` always holds at least `version`, and
`install` whenever the client has an [installation ID](#every-event-carries-a-random-server-id). The server assigns the
timestamp. A `201` is success; anything else is logged at `FINE` and dropped.

Redirects are not followed. The body is streamed with a fixed length, so
`HttpURLConnection` cannot re-send it to a redirect target: a redirect is
logged at `FINE` and the report is dropped, like any other answer that is
not `201`. Give `baseUrl` as the final URL — `https://` if the server
redirects `http://` there — or nothing reaches the server.

## Keys

A key identifies the program to the server and lets the operator revoke it;
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/software/stephenson/trace/TraceClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,10 @@ private TraceClient(Builder builder) {
* at {@code version}, reporting to the trace server at {@code baseUrl}.
* The version is sent as the tag {@code version} on every event; a blank
* one, or one longer than {@value #MAX_TAG_LENGTH} characters, is an
* {@link IllegalArgumentException}.
* {@link IllegalArgumentException}. Redirects are not followed, so
* {@code baseUrl} must be the final URL (e.g. {@code https://} when the
* server redirects {@code http://} there); otherwise every report is
* dropped and logged at {@code FINE}.
*/
public static Builder builder(String baseUrl, String application, String version) {
return new Builder(baseUrl, application, version);
Expand Down
Loading