Skip to content

Commit 3940ad9

Browse files
adambollentrevor-faunacleve-faunahenryfauna
authored
Merge fauna_logs branch into v4 (#672)
* Add optional, per-query parameters for providing a traceparent and tags (#654) * Add optional, per-query parameters for traceparent and tags * Fix merge conflicts * Fix tests. More merge conflicts * Address PR feedback * Tag validation (#658) * Add validation on per-query tags * Bump version for beta * Fix tags type (#661) * Fix tags type * 4.8.0-beta.2 * Force "logbeta" tag in publishConfig (#662) * Set version to 4.8.0 * Version * Run tests serially because reasons * Run all node versions in parallel * npm install * run npm install with v6 * Remove publishConfig block * Changelog * Skip failing test; passes locally * Removing beta note * Remove client validation and update tests --------- Co-authored-by: Trevor Finn <[email protected]> Co-authored-by: Cleve Stuart <[email protected]> Co-authored-by: Henry Ball <[email protected]>
1 parent 0de7383 commit 3940ad9

File tree

8 files changed

+260
-51
lines changed

8 files changed

+260
-51
lines changed

Diff for: .circleci/config.yml

-8
Original file line numberDiff line numberDiff line change
@@ -128,21 +128,13 @@ workflows:
128128
context: faunadb-drivers
129129
- core-stable-16:
130130
context: faunadb-drivers
131-
requires:
132-
- core-stable-14
133131
- core-stable-18:
134132
context: faunadb-drivers
135-
requires:
136-
- core-stable-16
137133

138134
# Nightly path
139135
- core-nightly-14:
140136
context: faunadb-drivers
141137
- core-nightly-16:
142138
context: faunadb-drivers
143-
requires:
144-
- core-nightly-14
145139
- core-nightly-18:
146140
context: faunadb-drivers
147-
requires:
148-
- core-nightly-16

Diff for: CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 4.8.0
2+
- Add `tags` and `traceheader` support in `client.query` [#672](https://github.com/fauna/faunadb-js/pull/672)
3+
14
## 4.7.1
25
- disallow undefined required args [#663](https://github.com/fauna/faunadb-js/pull/663)
36

Diff for: README.md

+24-1
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,9 @@ var data = client.query(q.Paginate(q.Collections()), {
237237

238238
#### Per-query options
239239

240-
Some options (currently only `secret` and `queryTimout`) can be overriden on a per-query basis:
240+
Some options can be provided on a per-query basis:
241241

242+
##### secret
242243
```javascript
243244
var createP = client.query(
244245
q.Create(q.Collection('test'), { data: { testField: 'testValue' } }),
@@ -256,12 +257,34 @@ var helper = client.paginate(
256257
)
257258
```
258259

260+
##### queryTimeout
259261
```javascript
260262
var data = client.query(q.Paginate(q.Collections()), {
261263
queryTimeout: 100,
262264
})
263265
```
264266

267+
##### traceparent
268+
A [W3C-compliant](https://w3c.github.io/trace-context) identifier for enabling distributed tracing across different
269+
vendors. If not provided, one is automatically generated server-side and attached to the query. Customer's should
270+
inspect the returned traceresponse to determine if a new traceparent has been created, and use that instead. See
271+
[Trace Context](https://w3c.github.io/trace-context) spec for more details.
272+
```javascript
273+
var data = client.query(q.Paginate(q.Collections()), {
274+
traceparent: "00-c91308c112be8448dd34dc6191567fa0-b7ad6b7169203331-01",
275+
})
276+
```
277+
278+
##### tags
279+
Allows for associating user-provided tags with a query.
280+
```javascript
281+
var data = client.query(q.Paginate(q.Collections()), {
282+
tags: { key1: "value1", key2: "value2" },
283+
})
284+
```
285+
Both tags and their associated values, must be strings. The only allowable characters are alphanumeric values as well
286+
as an underscope (_). Max length for keys is 40 characters. Max length for values is 60 characters.
287+
265288
#### Custom Fetch
266289

267290
To use a custom `fetch()` you just have to specify it in the configuration and make it compatible with the [standard Web API Specification of the Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).

0 commit comments

Comments
 (0)