[HTTP] Report telemetry of the configured protocol (#211279)

## Summary

Starting with 9.0, we default to `http2` under certain conditions. We
want to report to telemetry how many deployments actively use `http2`.


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Alejandro Fernández Haro 2025-02-17 18:28:04 +01:00 committed by GitHub
parent df67a09afa
commit c5857f929d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 14 additions and 0 deletions

View file

@ -307,6 +307,7 @@ describe('CoreUsageDataService', () => {
},
"keepaliveTimeout": 120000,
"maxPayloadInBytes": 1048576,
"protocol": "http1",
"requestId": Object {
"allowFromAnyIp": false,
"ipAllowlistConfigured": false,

View file

@ -280,6 +280,7 @@ export class CoreUsageDataService
rewriteBasePath: http.rewriteBasePath,
keepaliveTimeout: http.keepaliveTimeout,
socketTimeout: http.socketTimeout,
protocol: http.protocol,
compression: {
enabled: http.compression.enabled,
referrerWhitelistConfigured: isConfigured.array(http.compression.referrerWhitelist),

View file

@ -62,6 +62,7 @@ const createStartContractMock = () => {
},
keepaliveTimeout: 120000,
maxPayloadInBytes: 1048576,
protocol: 'http1',
requestId: {
allowFromAnyIp: false,
ipAllowlistConfigured: false,

View file

@ -91,6 +91,7 @@ export interface CoreConfigUsageData {
rewriteBasePath: boolean;
keepaliveTimeout: number;
socketTimeout: number;
protocol: 'http1' | 'http2';
compression: {
enabled: boolean;
referrerWhitelistConfigured: boolean;

View file

@ -151,6 +151,10 @@ export function getCoreUsageCollector(
type: 'long',
_meta: { description: 'Maximum payload size in bytes that is allowed.' },
},
protocol: {
type: 'keyword',
_meta: { description: 'Protocol to serve the requests ("http1" | "http2")' },
},
rewriteBasePath: {
type: 'boolean',
_meta: { description: 'Indicates if the base path should be rewritten.' },

View file

@ -8562,6 +8562,12 @@
"description": "Maximum payload size in bytes that is allowed."
}
},
"protocol": {
"type": "keyword",
"_meta": {
"description": "Protocol to serve the requests (\"http1\" | \"http2\")"
}
},
"rewriteBasePath": {
"type": "boolean",
"_meta": {