How do I filter by category in chrome's about://tracing | catapult tracing project? - trace

In the chrome tracing format specification, https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/edit, there is optional category information for filtering. How do I even access that filtering in chrome's about://tracing; that is catapult's tracing: https://github.com/catapult-project/catapult/tree/master/tracing

Related

How to use a tag/facet in metrics monitor in datadog?

I added a custom span tag through code to use a custom tag/facet to filter out specific http requests in datadog:
if span, ok := tracer.SpanFromContext(c); ok {
span.SetTag("someTag", someTagValue)
}
In Traces sub-section of APM section, if we click on any http request the tag is appearing with its value as well. I added it as a facet to make it accessible.
I am defining a metrics monitor and trying to use that tag/facet. In "from" section, the tag/facet does not appear in the list to query those requests. Is there a way to use/add such custom tag/facet in metrics monitor? Are the options in "from" section pre-defined?
Other datadog sections I have already explored:
In APM monitors, in "Trace Analytics" section, I am able to access that tag/facet. However, this section does not capture same metrics like requests/sec, errors per requests/sec etc.

IBM Watson Assistant: How can I filter messages for "anything else"?

In Analytics > User conversations, I would like to filter out the messages which my Watson Assistant was unable to answer in its conversations, i.e., when it returns the anything_else reply.
But since anything_else is not an intent nor an entity, I can't filter messages by it in the UI. Is it possible to therefore filter messages by the assistant's reply, like you can with user statements? That way I can filter out each time the assistant answered "I don't understand".
IBM Watson Assistant offers the log in the Analytics section of it UI and, IMHO more powerful, via REST API with filter expressions. With that API you can either download all logs and filter "offline" or apply some expressions. I recommend reading the documentation about how to query the "other" fields which includes the user responses.
I have written Python tools for Watson Assistant using the V1 and V2 APIs. The V1 tool is able to download or query the logs. An option is to download all available logs, then use jq to filter them.
python wctool.py -logs -config config.json.event -id 28ac4bcb-2aae-41aa-87ac-2e6074e1356a > logs201904.out
This gives you the information about which nodes were visited:
cat logs201904.out | jq -r '.logs | .[]
| .response.output.nodes_visited '
Filter for log records that visited "Anything else":
cat logs201904.out | jq -r '.logs | .[] | .response | select(
.output.nodes_visited[] | contains("Anything else")) '
anything_else means either an intent was not found, or the confidence was < 0.2.
Filter looking for intents = [], or confidence of first intent is below 20%

Owasp Zap Testing rest api

Is that possible to testing rest-api via OWASP ZAP ?
Url to attack worked just for GET requests.
For example, my api controllers work with only token. I have TokenController and this controller require POST data via JSON data include password and login. Can I someway testing this controller via OWASP ?
The short answer is yes. The long answer - it's complicated :)
Testing REST API is a bit harder than testing web API - you'll have to give Zap information about your API - which endpoints it has, parameters, etc. Can you share more about you're API? Does it have OpenAPI/Swagger document? Do you have existing tests? You can use either one of those for this task.
I gave a talk about how this can be achieved - you can find the recording here.
It possible to automate API testint with OWASP ZAP, but to perform the tests, I see two options: Offer some usage pattern, for example OpenAPI for ZAP consider extracting the information. And a second option would be to run an automated test to capture ZAP as passive scan information, and after that you can test the session information.
We recommend using the OpenAPI documentation.
The cucumber test would look like this:
Feature: Security
This feature is to test pokemon service security
Scenario: Validate passive and active scan
Given I import context from open API specification "/v2/api-docs"
And I remove alerts
| url |
| http://.*/v2/api-docs* |
And I import scan policy "javaclean" from file "javaclean.policy"
When I run active scan
And I generate security test HTML report with name "java-clean-security-report"
Then the number of risks per category should not be greater than
| low | medium | high | informational |
| 0 | 0 | 0 | 0 |
I am develop step for ZAP, view in the GitHub: https://github.com/osvaldjr/easy-cucumber/wiki/Security-steps
Example step for import OpenAPI docs:
#Given("^I import context from open API specification \"([^\"]*)\"$")
public void iImportContextFromOpenAPISpecification(String path)
throws ClientApiException, InterruptedException {
String url = getTargetUrl() + path;
log.info("Import Open API from url: " + url);
zapProxyApi.openapi.importUrl(url, null);
waitPassiveScanRunning();
verifyThatTheProxyHasCapturedHostInformation();
}
View others steps in: https://github.com/osvaldjr/easy-cucumber/blob/master/src/main/java/io/github/osvaldjr/stepdefinitions/steps/SecuritySteps.java

How to limit Bing Search API V5 to search specific sections of the website

Using bing.com, I can do a search like this (click here for link):
history site:berkeley.edu/about/
When I try the same using the API, I get very different results. As far as I can tell, the search results returns webpages that are not hosted in berkeley.edu (see bottom).
this is the HTTP GET request being made to Azure
https://api.cognitive.microsoft.com/bing/v5.0/search?q=history+site:berkeley.edu/about/&count=10&offset=0
This is my HTTP GET code
$.ajax({
url: "https://api.cognitive.microsoft.com/bing/v5.0/search"
, data: { "q":encodeURI("history+site:berkeley.edu/about/"), "count":"10", "offset":"0" }
, beforeSend: function(xhrObj){
xhrObj.setRequestHeader("Ocp-Apim-Subscription-Key","supply-your-key-here");
}
, type: "GET",
})
Any ideas what I could be doing wrong? Thanks
edit1: Seems my "problem" is related to the way AJAX is making the HTTP request. If I supply my key by using a Firefox header plugin and type this (https://api.cognitive.microsoft.com/bing/v5.0/search?q=history+site:berkeley.edu/about/&count=10&offset=0) on my browser URL box, I get the correct response.
search results using API
Environmental Design Library | UC Berkeley Library: A branch of the UC Berkeley Library system, the Environmental Design Library supports the research and teaching of the College of Environmental Design.
Proceedings Template - WORD - ideals.illinois.edu: "(c) ACM, 2007. This is the authors’ version of the work. It is posted here by permission of ACM for your personal use. Not for redistribution.
Trends in metadata practices: A longitudinal study of ...: Trends in metadata practices: A longitudinal study of collection federation. ... A Longitudinal Study of Collection Federation Carole Palmer Oksana ...
http://aerospaceutility.tripod.com/ · GitHub: Clone via HTTPS Clone with Git or checkout with SVN using the repository's web address.
HS RWC Colorado Sample Instructional Units - LiveBinder: Loading Livebinder HS RWC Colorado Sample Instructional Units HS Read Write Communicate Sample Instructional Units provided by the Colorado Department of Education.
Arroyo High School: News Archive: News Archive SIA Awards "As the school year comes to a close, the Students in Action club would like to honor three students for their lasting impact on our ...
English 12 (exp) | Utah Electronic High School: Please be mindful of the fact that this course is not a credit "quick fix." It is a rigorous, college-preparatory class that is both time and labor intensive.
Working SMARTer, not Harder: SOCIAL STUDIES ONLINE ...: SOCIAL STUDIES ONLINE RESOURCES AND LINKS COMPILATION beta List of Social Studies online resources and links to professional development opportunities ...
The Big List -- 20121008 - Grolier: The Big List -- 20121008: 1: EA: http://www.stanford.edu/group/bipolar.clinic/ Stanford Bipolar Disorders Clinic: 2: EA: http://www.mhsource.com/bipolar/
Spreadsheet of Conference Attendees - studylib.net: ÐÏ à¡± á > þÿ ] þÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ...
You can use Bing custom search alternately to make sure you get results only from the domain/webpages you want. Here is the call: https://api.cognitive.microsoft.com/bingcustomsearch/v7.0/search. You will need a different accesskey though, which you can get from customsearch.ai.
I'm getting correct results on both v5.0 and v7.0.
There seems nothing wrong with your query.
https://api.cognitive.microsoft.com/bing/v5.0/search?q=history+site:berkeley.edu/about/&count=10&offset=0
Perhaps you are caching results somewhere in your browser?
Update: Since IE does it, but Firefox doesn't. Have you disabled cache on IE?

Extra metadata unavailable in libspotify (ISRC, UPC)

The libspotify documentation for the Track subsystem makes no mention of metadata. You can see that extra metadata (such as ISRC) is present by using the XML Metadata API:
http://ws.spotify.com/lookup/1/?uri=spotify:album:6G9fHYDCoyEErUkHrFYfs4&extras=trackdetail
<album><name>Remedy</name><artist href="spotify:artist:4YrKBkKSVeqDamzBPWVnSJ"><name>Basement Jaxx</name></artist><released>1999</released><id type="upc">634904012922</id><tracks><track href="spotify:track:3zBhJBEbDD4a4SO1EaEiBP"><name>Rendez-vu</name><artist href="spotify:artist:4YrKBkKSVeqDamzBPWVnSJ"><name>Basement Jaxx</name></artist><available>true</available><id type="isrc">GBBKS9900090</id><disc-number>1</disc-number><track-number>1</track-number><length>346.158000</length><popularity>0.37000</popularity></track>[...etc...]
Here the album has a UPC code and each track has ISRC. Will this ever be available through libspotify or does it need a second query using the XML Metadata API once I've got album/track links from the API?