Contol logging options by api, path, or key

We have a couple paths that get hammered on constantly, 150-250k requests per day. This one path accounts for 90% of our logs. It would be nice to have the option to control logging on special paths or keys.

I.E. Only log errors, retain logs for X hours.

Currently our only recourse is to expire all logs after a couple weeks, including logs we would like longer retention on. Or create a cron job that removes logs to the path / key.

Do you mean the log browser GUI?

In the more recent versions of the dashboard, endpoints need to be specifically tracked. So they do not appear in the endpoint traffic view unless explicitly added. This won’t affect the log browser though.

At an API level (if the API is a single path), you can also set a private value using the REST API called "do_not_track": "true" in the root of the object, this will completely disable the API as part of the analytics (not tracked at all), however this also means you lose errors.

The last thing that you can do (but is not in the GUI) is a newish feature which is actually only used as pat of some bootstrapping scripts, but it may help you, you can add:

"extended_paths"": {
    "do_not_track_endpoints": [
        "path": "/foo",
        "method": "GET",
    ]
}

And the path itself will be ignored,m but the rest of the API will remain tracked (i.e. if there are more than one endpoint in the API, and this one endpoint is hammered).

Hi Martin,

Yes this is in reference to the log browser in the GUI.

I’m interested in the third option you mentioned, however I’m note sure where I am supposed to put the json blob. FYI, we are using the pro version with 2 nodes.

Thanks,

In the API Definition, for each version of your API (usually just one called “Default” there is the extended_paths object that contains a bunch off arrays (e.g. white_list, etc., if you add:

"do_not_track_endpoints": [
        "path": "/foo",
        "method": "GET",
    ]

to that object, and update the API it should stop tracking those URLs.