Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
public class RequestContextConstants {
public static final String TENANT_ID_HEADER_KEY = "x-tenant-id";
public static final String REQUEST_ID_HEADER_KEY = "request-id";
public static final String DATABASE_ID_HEADER_KEY = "x-database-id";

public static final Metadata.Key<String> TENANT_ID_METADATA_KEY =
Metadata.Key.of(TENANT_ID_HEADER_KEY, ASCII_STRING_MARSHALLER);
Expand All @@ -27,12 +28,13 @@ public class RequestContextConstants {
"traceparent",
"tracestate",
AUTHORIZATION_HEADER,
REQUEST_ID_HEADER_KEY);
REQUEST_ID_HEADER_KEY,
DATABASE_ID_HEADER_KEY);

/**
* These headers may affect returned results and should be accounted for in any cached remote
* results
*/
static final Set<String> CACHE_MEANINGFUL_HEADERS =
Set.of(TENANT_ID_HEADER_KEY, AUTHORIZATION_HEADER);
Set.of(TENANT_ID_HEADER_KEY, AUTHORIZATION_HEADER, DATABASE_ID_HEADER_KEY);
}