UNPKG

1.48 kBTypeScriptView Raw
1/**
2 * Copyright 2019, OpenCensus Authors
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16/**
17 * This module contains the functions for serializing and deserializing
18 * TagMap (TagContext) with W3C Correlation Context as the HTTP text format.
19 * It allows tags to propagate across requests.
20 *
21 * OpenCensus uses W3C Correlation Context as the HTTP text format.
22 * https://github.com/w3c/correlation-context/blob/master/correlation_context/HTTP_HEADER_FORMAT.md
23 */
24import { TagMap } from '../tag-map';
25export declare const MAX_NUMBER_OF_TAGS = 180;
26/**
27 * Serializes a given TagMap to the on-the-wire format based on the W3C HTTP
28 * text format standard.
29 * @param tagMap The TagMap to serialize.
30 */
31export declare function serializeTextFormat(tagMap: TagMap): string;
32/**
33 * Deserializes input to TagMap based on the W3C HTTP text format standard.
34 * @param str The TagMap to deserialize.
35 */
36export declare function deserializeTextFormat(str: string): TagMap;