Skip to content

Commit

Permalink
Add moesif configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
alombarte committed Nov 20, 2023
1 parent ec86da9 commit 245fdc8
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 19 deletions.
11 changes: 9 additions & 2 deletions v2.5/documentation/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,13 @@
},
"required": ["content_type"],
"properties": {
"ref": {
"type": "string",
"title": "Reference",
"description": "The relative reference to the `components/schema` OpenAPI definition that will be used as definition of the accepted request. Notice that the path `#/components/schemas/` is not needed.",
"examples": ["your_schema_name"]

},
"description": {
"type": ["string"],
"title": "Description",
Expand Down Expand Up @@ -252,8 +259,8 @@
"ref": {
"type": "string",
"title": "Reference",
"description": "The relative reference to the `components/schema` OpenAPI definition that will be used as definition of the accepted request.",
"examples": ["#/mydef"]
"description": "The relative reference to the `components/schema` OpenAPI definition that will be used as definition of the accepted request. Notice that the path `#/components/schemas/` is not needed.",
"examples": ["your_schema_name"]

},
"description": {
Expand Down
3 changes: 3 additions & 0 deletions v2.5/service_extra_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@
"telemetry/newrelic": {
"$ref": "telemetry/newrelic.json"
},
"telemetry/moesif": {
"$ref": "telemetry/moesif.json"
},
"documentation/openapi": {
"$ref": "documentation/openapi.json"
},
Expand Down
34 changes: 17 additions & 17 deletions v2.5/telemetry/moesif.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://www.krakend.io/schema/v2.5/telemetry/moesif.json",
"title": "Moesif integration",
"description": "The Moesif integration helps you understand and monetize API usage with a robust analytics and billing platform.\n\nSee: https://www.krakend.io/docs/enterprise/telemetry/moesif/",
"description": "The Moesif integration helps you understand and monetize API usage with a robust analytics and billing platform.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/",
"type": "object",
"additionalProperties": false,
"patternProperties": {
Expand All @@ -16,48 +16,48 @@
"application_id": {
"$id": "#telemetry/moesif/application_id",
"title": "Collector Application ID",
"description": "The Collector Application ID is used to send events, actions, users, and companies to Moesif's Collector API. Moesif provides it under the 'API Keys' section.\n\nSee: https://www.krakend.io/docs/enterprise/telemetry/moesif/",
"description": "The Collector Application ID is used to send events, actions, users, and companies to Moesif's Collector API. Moesif provides it under the 'API Keys' section.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/",
"type": "string"
},
"debug": {
"$id": "#telemetry/moesif/debug",
"title": "Enable debug",
"description": "Set to true when configuring Moesif for the first time while in development, to see the activity in the logs. Set to false in production.\n\nSee: https://www.krakend.io/docs/enterprise/telemetry/moesif/",
"description": "Set to true when configuring Moesif for the first time while in development, to see the activity in the logs. Set to false in production.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/",
"type": "boolean",
"default": false
},
"log_body": {
"$id": "#telemetry/moesif/log_body",
"title": "Send the body",
"description": "Send the body of all endpoints and requests to Moesif.\n\nSee: https://www.krakend.io/docs/enterprise/telemetry/moesif/",
"description": "Send the body of all endpoints and requests to Moesif.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/",
"type": "boolean",
"default": true
},
"event_queue_size": {
"$id": "#telemetry/moesif/event_queue_size",
"title": "Event Queue Size",
"description": "Sends the number of events you can hold in-memory to send them asynchronously to Moesif. If the throughput of your API generates more events than the size of the queue, the exceeding events will be discarded and not reported.\n\nSee: https://www.krakend.io/docs/enterprise/telemetry/moesif/",
"description": "Sends the number of events you can hold in-memory to send them asynchronously to Moesif. If the throughput of your API generates more events than the size of the queue, the exceeding events will be discarded and not reported.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/",
"type": "integer",
"default": 1000000
},
"batch_size": {
"$id": "#telemetry/moesif/batch_size",
"title": "Batch Size",
"description": "Number of events you will send on every batch reporting asynchronously to Moesif. For high throughput you will need to increase this value.\n\nSee: https://www.krakend.io/docs/enterprise/telemetry/moesif/",
"description": "Number of events you will send on every batch reporting asynchronously to Moesif. For high throughput you will need to increase this value.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/",
"type": "integer",
"default": 200
},
"timer_wake_up_seconds":{
"$id": "#telemetry/moesif/timer_wake_up_seconds",
"title": "Timer Wake Up",
"description": "Specifies how often a background thread runs to send events to Moesif. Value in seconds.\n\nSee: https://www.krakend.io/docs/enterprise/telemetry/moesif/",
"description": "Specifies how often a background thread runs to send events to Moesif. Value in seconds.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/",
"type": "integer",
"default": 2
},
"request_header_masks": {
"$id": "#telemetry/moesif/request_header_masks",
"title": "Request header masks",
"description": "The list of request headers that you want to mask their values before sending them to Moesif.\n\nSee: https://www.krakend.io/docs/enterprise/telemetry/moesif/",
"description": "The list of request headers that you want to mask their values before sending them to Moesif.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/",
"type": "array",
"items": {
"type": "string"
Expand All @@ -67,7 +67,7 @@
"response_header_masks": {
"$id": "#telemetry/moesif/response_header_masks",
"title": "Response header masks",
"description": "The list of response headers that you want to mask their values before sending them to Moesif.\n\nSee: https://www.krakend.io/docs/enterprise/telemetry/moesif/",
"description": "The list of response headers that you want to mask their values before sending them to Moesif.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/",
"type": "array",
"items": {
"type": "string"
Expand All @@ -77,7 +77,7 @@
"request_body_masks": {
"$id": "#telemetry/moesif/request_body_masks",
"title": "Request body masks",
"description": "The list of fields in the request body that you want to mask before sending them to Moesif. You can set `log_body` to `false` to prevent any body being sent.\n\nSee: https://www.krakend.io/docs/enterprise/telemetry/moesif/",
"description": "The list of fields in the request body that you want to mask before sending them to Moesif. You can set `log_body` to `false` to prevent any body being sent.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/",
"type": "array",
"items": {
"type": "string"
Expand All @@ -87,7 +87,7 @@
"response_body_masks": {
"$id": "#telemetry/moesif/response_body_masks",
"title": "Response body masks",
"description": "The list of fields in the response body that you want to mask before sending them to Moesif. You can set `log_body` to `false` to prevent any body being sent.\n\nSee: https://www.krakend.io/docs/enterprise/telemetry/moesif/",
"description": "The list of fields in the response body that you want to mask before sending them to Moesif. You can set `log_body` to `false` to prevent any body being sent.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/",
"type": "array",
"items": {
"type": "string"
Expand All @@ -98,7 +98,7 @@
"user_id_headers": {
"$id": "#telemetry/moesif/user_id_headers",
"title": "User ID headers",
"description": "Defines the list of possible headers that can identify a user uniquely. When the header is `Authorization`, it automatically extracts the username if it contains an `Authorization: Basic` value with no additional configuration. If, on the other hand, you use tokens and pass an `Authorization: Bearer`, it will extract the user ID from the JWT claim defined under `user_id_jwt_claim`. If there are multiple headers in the list, all of them are tested in the given order, and the first existing header in the list is used to extract the user ID (successfully or not).\n\nSee: https://www.krakend.io/docs/enterprise/telemetry/moesif/",
"description": "Defines the list of possible headers that can identify a user uniquely. When the header is `Authorization`, it automatically extracts the username if it contains an `Authorization: Basic` value with no additional configuration. If, on the other hand, you use tokens and pass an `Authorization: Bearer`, it will extract the user ID from the JWT claim defined under `user_id_jwt_claim`. If there are multiple headers in the list, all of them are tested in the given order, and the first existing header in the list is used to extract the user ID (successfully or not).\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/",
"type": "array",
"examples": [
[
Expand All @@ -110,7 +110,7 @@
"user_id_jwt_claim": {
"$id": "#telemetry/moesif/user_id_jwt_claim",
"title": "User ID JWT claim",
"description": "When using JWT tokens, it defines which claim contains the user ID. The field must be a string.\n\nSee: https://www.krakend.io/docs/enterprise/telemetry/moesif/",
"description": "When using JWT tokens, it defines which claim contains the user ID. The field must be a string.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/",
"type": "string",
"default": "sub"
},
Expand All @@ -121,25 +121,25 @@
},
"$id": "#telemetry/moesif/identify_company",
"title": "Identify company",
"description": "It sets which strategy you want to use to identify the company. Identifying the company helps you efficiently govern your API. Choose the system you wish to apply (**declare only one property**).\n\nSee: https://www.krakend.io/docs/enterprise/telemetry/moesif/",
"description": "It sets which strategy you want to use to identify the company. Identifying the company helps you efficiently govern your API. Choose the system you wish to apply (**declare only one property**).\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/",
"type": "object",
"maxProperties": 1,
"properties": {
"jwt_claim": {
"title": "Company in Claim",
"description": "The company is stored in a claim inside the JWT. The claim must return a string.\n\nSee: https://www.krakend.io/docs/enterprise/telemetry/moesif/",
"description": "The company is stored in a claim inside the JWT. The claim must return a string.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/",
"type": "string",
"examples": ["company_id"]
},
"header": {
"title": "Company in Header",
"description": "The company is identified using a header. Provide the header name.\n\nSee: https://www.krakend.io/docs/enterprise/telemetry/moesif/",
"description": "The company is identified using a header. Provide the header name.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/",
"type": "string",
"examples": ["X-Tenant"]
},
"query_string": {
"title": "Company in Query String",
"description": "The company is always passed inside a query string when calling any URL. Provide the query string name.\n\nSee: https://www.krakend.io/docs/enterprise/telemetry/moesif/",
"description": "The company is always passed inside a query string when calling any URL. Provide the query string name.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/",
"type": "string",
"examples": ["company"]

Expand Down

0 comments on commit 245fdc8

Please sign in to comment.