I am only starting on DataDog, and what I want to accomplish is adding a few data to the events that DD_RUM collects. More specifically, I would like to sent to datadog the entire event object of any user triggered action from a React application. I had a look on beforeSend (I wasn't able to add the event to the payload). And I am aware that there is an addAction api to send to DataDog custom actions, but I am looking for a solution that would work for any action.
My current DD configs on the react application:
datadogRum.init({
applicationId: 'my-app-id',
clientToken: 'my-token',
site: 'datadoghq.eu',
service:'react-datadog-poc',
env:'dev',
version: '1.0.0',
sessionSampleRate: 100,
sessionReplaySampleRate: 100,
trackUserInteractions: true,
forwardErrorsToLogs: true,
trackFrustrations: true,
trackResources: true,
trackLongTasks: true,
defaultPrivacyLevel:'allow'
});
datadogLogs.init({
clientToken: 'my-token',
site: 'datadoghq.eu',
forwardErrorsToLogs: true,
forwardConsoleLogs: "all",
forwardReports: "all",
sessionSampleRate: 100
});
datadogRum.startSessionReplayRecording();
Related
I need to point out that I am not talking about the API that they provide but rather what they use to download the content when you are just scrolling the page.
I have managed to get the request which I believe is driving the whole thing, but I don't quite grasp how it works.
Here it is URL encoded:
https://twitter.com/i/api/graphql/u7I0lIRjA96yhblCP2akgA/UserTweetsAndReplies?variables=%7B%22userId%22%3A%221689053936%22%2C%22count%22%3A40%2C%22cursor%22%3A%22HBaKgLOFsoP%2BpykAAA%3D%3D%22%2C%22includePromotedContent%22%3Atrue%2C%22withCommunity%22%3Atrue%2C%22withSuperFollowsUserFields%22%3Atrue%2C%22withDownvotePerspective%22%3Afalse%2C%22withReactionsMetadata%22%3Afalse%2C%22withReactionsPerspective%22%3Afalse%2C%22withSuperFollowsTweetFields%22%3Atrue%2C%22withVoice%22%3Atrue%2C%22withV2Timeline%22%3Afalse%2C%22__fs_dont_mention_me_view_api_enabled%22%3Afalse%2C%22__fs_interactive_text_enabled%22%3Afalse%2C%22__fs_responsive_web_uc_gql_enabled%22%3Afalse%7D
And here are the decoded variables:
{
"userId": "1689053936",
"count": 40,
"cursor": "HBaKgLOFsoP+pykAAA==",
"includePromotedContent": true,
"withCommunity": true,
"withSuperFollowsUserFields": true,
"withDownvotePerspective": false,
"withReactionsMetadata": false,
"withReactionsPerspective": false,
"withSuperFollowsTweetFields": true,
"withVoice": true,
"withV2Timeline": false,
"__fs_dont_mention_me_view_api_enabled": false,
"__fs_interactive_text_enabled": false,
"__fs_responsive_web_uc_gql_enabled": false
}
So, what I don't understand here is u7I0lIRjA96yhblCP2akgA in the link and cursor In the variables. Where does this come from? How do they pass to the API which tweets in particular need to be loaded? How would one construct this request by themselves?
I want to disable all defaults commands that comes with Commando. Im trying to use this code but I keep getting this same error every time.
I've already tried other formats of this same code, none of them worked.
bot.registry.registerDefaultCommands({
help: false,
prefix: false,
ping: false,
_eval: false,
unknownCommand: true,
commandState: true
})
throw new Error(`A command with the name/alias "${command.name}" is already registered.`);
^
Error: A command with the name/alias "eval" is already registered.
I stumbled upon this post and saw that it hasn't gotten an answer yet. So I'll share an answer.
Remove:
bot.registry.registerDefaultCommands({
help: false,
prefix: false,
ping: false,
_eval: false,
unknownCommand: true,
commandState: true
})
Removing this will remove all default commands and you are free to name commands after these. If you need anymore help, reply to this post.
I am using inline editing of jQgrid with edit action button, but aftersavefunc not working. what is the right way to do it ?
I want restore the row and show error message when I receive from server : {"success":false,"id":null,"message":"You can not do that"}
following is my code:
angular.element(document).ready(function () {
$("#jqGrid").jqGrid({
datatype: "local",
data: $scope.listResellerUser,
mtype: "POST",
colModel: [
{ label:'Full Name', name: 'fullname' },
{ label: 'User Name', name: 'username' },
{ label: 'User Id', name: 'userId', hidden: true, key:true },
{ label: 'Email', name: 'email' },
{ label: 'User Level', name:'roleId', index:'roleId', edittype:'select', editable:true, align:'center', formatter:'select',
editoptions:{value:setRoleDropdown()
}},
{name:'Actions',index:'Actions',width:55,align:'center',sortable:false,search: false,formatter:'actions',
formatoptions:{
keys: true, // we want use [Enter] key to save the row and [Esc] to cancel editing.
delbutton:false,
}}
],
editurl: "/myreseller/changeuserrole",
styleUI : 'Bootstrap',
page: 1,
autowidth: true,
height: 250,
rowNum: 20,
scrollPopUp:true,
scrollLeftOffset: "83%",
viewrecords: true,
scroll: 1, // set the scroll property to 1 to enable paging with scrollbar - virtual loading of records
emptyrecords: 'Scroll to bottom to retrieve new page', // the message will be displayed at the bottom
pager: "#jqGridPager",
editParams: {
"aftersavefunc": function (rowid, response, options) {
alert("row with rowid=" + rowid + " is successfuly modified.");
}
}
});
First of all it's important to include the information about the version of jqGrid, which you use (or which you can use) and the fork of jqGrid (free jqGrid, commercial Guriddo jqGrid JS or an old jqGrid in version <=4.7) in the text of your question.
I develop free jqGrid fork, which supports Bootstrap too (see here). Thus I can't help you in specific problems of Guriddo jqGrid JS. It seems to me, but you use non-existing option editParams. Free jqGrid allows to specify common inline editing options via inlineEditing option (see the wiki article). If you stay by commercial Guriddo jqGrid JS, then you probably have to specify the callback functions of the formatter:'actions' inside of formatoptions (see the documentation of onSuccess, onError, afterSave and other callbacks).
Moreover the callback aftersavefunc seems to be wrong choice in your case. It will be called after processing of the server response. Every response from editurl with successful HTTP status code will be interpreted as success and the changes (wrong changed) will be saved in the grid. One can solve the problem either by usage errorfunc callback and returning some error HTTP status code (>=400) or by usage successfunc callback, which allows to process the content of the server response and return [false, "error text"] or [true] depend on the content of the server response. It seems to me that it's what you need.
I have a store that is huge, (thousands of rows), and in order for my app to run faster I would like to set a max page Size to load when the app is first opened. Then only display the rest of the data of the user scrolls down. Here is what I have so far:
Ext.define("myApp.store.foo", {
extend : 'Ext.data.Store',
requires : ['Ext.data.Store', 'myApp.model.foo', 'Ext.data.reader.Xml'],
alias: 'myApp.store.approachMainStore',
config: {
model : 'myApp.model.foo',
storeId: 'mainStore',
autoLoad: true,
pageSize: 50,
proxy : {
type : "ajax",
url : 'resources/images/data/bar_all.xml',
reader : {
type : "xml",
pageParam: 'page',
clearOnPageLoad: false,
rootProperty : 'foo',
record : 'bar'
}
}
}
});
I'm using a xtype of List. But when I run my app everything works except it loads all the data just as before I added pageSize: 50, What am I missing?
Running Sencha Touch 2.4.1
You should use ListPaging plugin in the list.
{
xclass: 'Ext.plugin.ListPaging',
autoPaging: true,
loadMoreText : 'Loading more',
noMoreRecordsText : 'loaded'
}
Please check sencha touch documentation for further info.
In order for paging to work the server side needs to respond to the parameters sent. You have to replace the static XML file with one that is generated on the fly. That script needs to recognize the paging parameters (page, limit, start) and it must return total and count in addition to the data.
If you don't mind to send all the data and just want to speed up the display, look into bufferedRenderer.
I just noticed that the question is about sencha touch and I'm answering for ExtJs 4.2. I'm not sure if it is valid for both.
I am looking into choosing an html editor. I have tried jHtmlArea (thinking that it was JQueryTE.
Anyway I also tried JQuery TE which is simple to use, just call the jqte().
But I can not seem to find how to set which function of the toolbar I need (like I can do in jHtmlArea).
How can I configure only the options I need in the toolbar?
See the uncompressed version of jquery te source code.
find this:
var vars = $.extend({
// options
'status' : true,
'css' : "jqte",
'title' : true,
'titletext' : varsTitle,
'button' : "OK",
'format' : true,
...
}, options);
Copy and paste the default options to your jqte initialization, pick only buttons you want to disable and set them to false, for ex. I used this to keep just basic formatting:
$('[data-wysiwyg]').jqte({
// options
'format': false,
'fsize': false,
'ol': false,
'ul': false,
'outdent': false,
'indent': false,
'left': false,
'center': false,
'right': false,
'rule': false
});
It is ugly and unintuitive, but as I've just found out, yet in 2014 most simple web wysiwygs are useless or have at least more serious trouble, jquery TE fitted my needs best.