-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathotel-recipes-schema.json
122 lines (120 loc) · 3.96 KB
/
otel-recipes-schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
{
"$schema": "https://json-schema.org/draft-07/schema",
"$id": "https://github.com/joaopgrassi/otel-recipes/otel-recipes-schema.json",
"title": "JSON Schema for OTel recipe files",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier of the sample app. E.g. console, webapp, rest-api"
},
"languageId": {
"type": "string",
"description": "The unique identifier of the programming language. MUST be one of the suggested by the schema",
"enum": ["csharp", "js", "go", "java", "python"]
},
"signal": {
"type": "string",
"description": "The unique identifier of the telemetry signal. MUST be one of the suggested by the schema",
"enum": ["traces", "metrics", "logs"]
},
"displayName": {
"type": "string",
"description": "The user friendly name of the sample app. This is shown on the website (filters)",
"maxLength": 100
},
"description": {
"type": "string",
"description": "A brief description of the sample app. This is shown in the 'sample metadata' section on the website",
"maxLength": 250
},
"tags": {
"type": "array",
"description": "Related tags with the language/technology of the recipe.",
"items": {
"type": "string",
"enum": ["console", "api", "db", "http", "web", "manual", "automatic", "sampling"]
},
"maxItems": 4,
"additionalItems": false
},
"sourceRoot": {
"type": "string",
"description": "The URL to the root directory of the sample app on GitHub. It's best to use a link with a ref to a tag/release version instead of using 'main'",
"format": "uri"
},
"steps": {
"type": "array",
"description": "The list steps necessary to configure OpenTelemetry for the sample",
"minItems": 1,
"uniqueItems": true,
"items": {
"$ref": "#/definitions/stepContent"
}
},
"dependencies": {
"type": "array",
"description": "The list of dependencies (packages) necessary to configure OpenTelemetry for the sample",
"minItems": 1,
"uniqueItems": true,
"items": {
"$ref": "#/definitions/dependencyContent"
}
}
},
"required": [
"id",
"languageId",
"signal",
"displayName",
"description",
"sourceRoot",
"steps",
"dependencies"
],
"definitions": {
"stepContent": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "The user friendly name of the step. This is shown on the website in the list of steps to follow. E.g. Configure the exporter, Configure the Trace Provider"
},
"description": {
"type": "string",
"description": "A brief description of the step"
},
"order": {
"type": "integer",
"description": "The order in which this step should appear in the list. Starting with 1 for the first step",
"default": 1
},
"source": {
"type": "string",
"description": "The raw URL (raw.githubusercontent.com) to the file in the sample app that contains the code for this step. It's best to use a link with a ref to a tag/release version instead of using 'main'",
"format": "uri"
},
"required": {
"type": "boolean",
"description": "Indicates if this step is mandatory for the user or not",
"default": true
}
},
"required": ["displayName", "order", "source"]
},
"dependencyContent": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The identifier of the dependency/package the user needs to install"
},
"version": {
"type": "string",
"description": "The version of the depedency/package required for the sample"
}
},
"required": ["id", "version"]
}
}
}