You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function_createBasePoint(options={}){const{
operation,
requestId,
status,
tokenId,
userId,
endpoint ='unknown',
timestamp =newDate(),}=options;constpoint=newPoint(MEASUREMENT_NAME).tag('operation',operation).tag('status',status).tag('request_id',requestId).tag('endpoint',endpoint)timestampif(tokenId)point.tag('token_id',tokenId);if(userId)point.tag('user_id',userId);returnpoint;}letpoint=_createBasePoint({operation: 'start',
requestId,status: 'pending',
tokenId,
userId,endpoint: metadata?.endpoint||'unknown',timestamp: newDate(),});// Add specific fields to this "start" operationpoint.floatField('estimated_amount',estimatedAmount);point.floatField('balance_before',tokenDoc.balance||0);})
Expected behavior
I expected to parse the Date() as it should.
Actual behavior
I'm using the nodejs client to interact with influxdb, but in sending timestamp as new Date (it's exactly like the example file) it throws this error:
TypeError: this.dateToProtocolTimestamp is not a function
at E.convertTime (./node_modules/@influxdata/influxdb-client/dist/index.mjs:5:1242)
at Fe.toLineProtocol (./node_modules/@influxdata/influxdb-client/dist/index.mjs:4:3994)
at E.writePoint (./node_modules/@influxdata/influxdb-client/dist/index.mjs:5:481)
Additional info
No response
The text was updated successfully, but these errors were encountered:
Specifications
Code sample to reproduce problem
Expected behavior
I expected to parse the Date() as it should.
Actual behavior
I'm using the nodejs client to interact with influxdb, but in sending timestamp as new Date (it's exactly like the example file) it throws this error:
TypeError: this.dateToProtocolTimestamp is not a function
at E.convertTime (./node_modules/@influxdata/influxdb-client/dist/index.mjs:5:1242)
at Fe.toLineProtocol (./node_modules/@influxdata/influxdb-client/dist/index.mjs:4:3994)
at E.writePoint (./node_modules/@influxdata/influxdb-client/dist/index.mjs:5:481)
Additional info
No response
The text was updated successfully, but these errors were encountered: