Commit graph

12 commits

Author SHA1 Message Date
Maryam Saeidi
3d86a175d7
Extend default log pattern on server-side to include error information (#219940)
## Release Notes
Kibana logging's pattern layout, used by default for the console
appender, will now use a new default pattern layout
`[%date][%level][%logger] %message %error`. This will include the error
name and stack trace if these were included in the log entry. To opt out
of this behavior users can omit the `%error` placeholder from their log
pattern config in kibana.yml e.g.:
```
logging:
  appenders:
    console:
      type: console
      layout:
        type: pattern
        pattern: "[%date][%level][%logger] %message"
```

## Summary

Previously, when we pass the error in meta, the information related to
stacktrace and error message was not available in console. This PR
changed the default pattern to also include error information if it is
provided in meta (similar to the way that the logging happens when error
is directly passed to logger.error).

New pattern: (added `%error` at the end)
```
[%date][%level][%logger] %message %error
```

Here you can see the difference:

Logger:

```
server.logger.error(
        `Unable to create Synthetics monitor ${monitorWithNamespace[ConfigKey.NAME]}`,
        { error: e }
      );
```

#### Before


![image](https://github.com/user-attachments/assets/4f3ff751-84d5-4b5b-b6a9-d49f868a9606)

#### After


![image](https://github.com/user-attachments/assets/e22b8e45-1b0a-4d8c-b51d-5dfb3938da4f)


### Alternative
We could also change the MetaConversion and include this information,
but we might have additional meta information which I am not sure if it
is OK to be logged by default. Let me know if you prefer changing
MetaConversion instead of adding a new error conversion.

<details>
<summary>Code changes for MetaConversion</summary>

```
function isError(x: any): x is Error {
  return x instanceof Error;
}

export const MetaConversion: Conversion = {
  pattern: /%meta/g,
  convert(record: LogRecord) {
    if (!record.meta) {
      return '';
    }
    const { error, ...rest } = record.meta;
    const metaString = Object.keys(rest).length !== 0 ? JSON.stringify(rest) : '';
    let errorString = '';

    if (isError(record.meta?.error)) {
      errorString = record.meta?.error.stack || '';
    }

    return [metaString, errorString].filter(Boolean).join(' ');
  },
};
```
</details>

Here is how adjusting meta will look like in this case:


![image](https://github.com/user-attachments/assets/d7dce9bc-7147-472d-b434-373322f41bbf)
2025-05-22 16:57:42 +02:00
Colleen McGinnis
fbda17de2d
[docs] Fix various syntax and rendering errors (#218883)
Fixes various syntax and rendering errors that might include:

* Fixing broken images
* Hardcoding book-level substitution values
* Fixing incorrectly closed blocks (admonitions, tab sets, code blocks,
dropdowns etc.)
* Fixing poorly migrated complex tables
* Fixing poorly migrated lists
* Fixing poorly migrated tab sets
* Removing inline text formatting from directive titles where they won't
be rendered (for example, inline `code` formatting in dropdown titles)
* Specifying if a version is trying to communicate if a feature was
added, deprecated, or coming (for example, during migration
`deprecated:[8.15.0]` became `[8.15.0]`, which doesn't give any
information about _what_ happened in 8.15.0)
* Note: I used an `{admonition}` for this, but you can change it to
prose or some other kind of admonition if you want.
* Fixing nested dropdowns / definition lists
* Fixing poorly migrated footnotes
* Updating references to prerelease `9.0.0` versions (using a repo-level
substitution until there is a solution to
https://github.com/elastic/docs-builder/issues/737)

Links to pages that were updated:

| Before | After |
|---|---|
| https://www.elastic.co/docs/extend/kibana/development-documentation |
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/development-documentation
|
| https://www.elastic.co/docs/extend/kibana/development-security |
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/development-security
|
| https://www.elastic.co/docs/extend/kibana/development-tests |
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/development-tests
|
|
https://www.elastic.co/docs/extend/kibana/external-plugin-functional-tests
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/external-plugin-functional-tests
|
| https://www.elastic.co/docs/extend/kibana/external-plugin-localization
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/external-plugin-localization
|
| https://www.elastic.co/docs/extend/kibana/interpreting-ci-failures |
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/interpreting-ci-failures
|
| https://www.elastic.co/docs/extend/kibana/plugin-list |
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/plugin-list
|
| https://www.elastic.co/docs/extend/kibana/sample-data |
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/sample-data
|
| https://www.elastic.co/docs/extend/kibana/saved-objects-service |
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/saved-objects-service
|
| https://www.elastic.co/docs/extend/kibana/sharing-saved-objects |
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/sharing-saved-objects
|
| https://www.elastic.co/docs/extend/kibana/stability |
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/stability
|
| https://www.elastic.co/docs/reference/kibana/advanced-settings |
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/advanced-settings
|
|
https://www.elastic.co/docs/reference/kibana/configuration-reference/ai-assistant-settings
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/configuration-reference/ai-assistant-settings
|
|
https://www.elastic.co/docs/reference/kibana/configuration-reference/fleet-settings
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/configuration-reference/fleet-settings
|
|
https://www.elastic.co/docs/reference/kibana/configuration-reference/general-settings
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/configuration-reference/general-settings
|
|
https://www.elastic.co/docs/reference/kibana/configuration-reference/monitoring-settings
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/configuration-reference/monitoring-settings
|
|
https://www.elastic.co/docs/reference/kibana/configuration-reference/reporting-settings
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/configuration-reference/reporting-settings
|
|
https://www.elastic.co/docs/reference/kibana/configuration-reference/task-manager-settings
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/configuration-reference/task-manager-settings
|
|
https://www.elastic.co/docs/reference/kibana/connectors-kibana/cases-webhook-action-type
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/connectors-kibana/cases-webhook-action-type
|
|
https://www.elastic.co/docs/reference/kibana/connectors-kibana/email-action-type
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/connectors-kibana/email-action-type
|
|
https://www.elastic.co/docs/reference/kibana/connectors-kibana/pre-configured-connectors
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/connectors-kibana/pre-configured-connectors
|
|
https://www.elastic.co/docs/reference/kibana/connectors-kibana/servicenow-action-type
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/connectors-kibana/servicenow-action-type
|
|
https://www.elastic.co/docs/reference/kibana/connectors-kibana/servicenow-itom-action-type
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/connectors-kibana/servicenow-itom-action-type
|
|
https://www.elastic.co/docs/reference/kibana/connectors-kibana/servicenow-sir-action-type
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/connectors-kibana/servicenow-sir-action-type
|
|
https://www.elastic.co/docs/reference/kibana/connectors-kibana/thehive-action-type
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/connectors-kibana/thehive-action-type
|
|
https://www.elastic.co/docs/reference/kibana/connectors-kibana/webhook-action-type
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/connectors-kibana/webhook-action-type
|
| https://www.elastic.co/docs/reference/kibana/kibana-audit-events |
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/kibana-audit-events
|
| https://www.elastic.co/docs/reference/kibana/kibana-plugins |
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/kibana-plugins
|
| https://www.elastic.co/docs/release-kibana/notes/index |
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/release-notes/index
|

---------

Co-authored-by: wajihaparvez <wajiha.parvez@elastic.co>
2025-05-22 10:10:07 +02:00
Steph Milovic
0de633e01d
[GenAI Connectors] Update Default Model IDs for Bedrock and OpenAI Connectors (#220146) 2025-05-07 17:34:06 -06:00
florent-leborgne
8a05701cc4
[Docs] Replace remaining occurrences of ESS (#220045)
This PR updates some remaining obsolete variables and mentions of
ESS/Elasticsearch Service that should now refer to Elastic Cloud Hosted.

Note: There are still a few valid references to the Elasticsearch
service, not to be mixed with the cloud offering bearing the same name.
2025-05-05 10:29:30 +00:00
Dima Arnautov
6722f142a4
Support local file path for xpack.productDocBase.artifactRepositoryUrl (#217046)
## Summary

Closes https://github.com/elastic/kibana/issues/216583

Adds support for a local file path in
`xpack.productDocBase.artifactRepositoryUrl` setting.
If local path with `file://` protocol is provided, it has to contain a
path to a directory with the artifacts and the `index.xml` file.

#### How to test 

1. Download the XML and zip files from
https://kibana-knowledge-base-artifacts.elastic.co
2. Create a folder, e.g. `mkdir /Users/<my_user>/test_artifacts` and
place all the files there. The XML file has to be called `index.xml`
3. Add `xpack.productDocBase.artifactRepositoryUrl:
'file:///Users/<my_user>/test_artifacts'` to your `kibana.dev.yml`
4. Go to `/app/management/kibana/observabilityAiAssistantManagement` in
Kibana and install Elastic documentation
5. Kibana dev server should report `[2025-04-07T14:05:10.640+02:00][INFO
][plugins.productDocBase.package-installer] Documentation installation
successful for product [security] and version [8.17]`
6. Check `data/ai-kb-artifacts` folder in your Kibana repo, it should
contain zip files with docs

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2025-04-14 15:27:41 +02:00
Colleen McGinnis
e60b91a076
[docs] Remove reliance on temporary redirects part 2 (#216362)
Related to https://github.com/elastic/docs-content/pull/914
Related to https://github.com/elastic/elasticsearch/pull/125663

Removes reliance on temporary redirects in the elasticsearch and
docs-content repos.
2025-03-31 07:43:40 +00:00
Colleen McGinnis
369a43b2c2
[docs] Remove reliance on temporary redirects (#216315)
Related to https://github.com/elastic/docs-content/pull/914

Removes reliance on temporary redirects in the docs-content repo.

@florent-leborgne can you help me with backport labels? I always get
mixed up across repos.
2025-03-28 10:54:32 -05:00
florent-leborgne
56acc69d59
[Docs] Settings - Specify that search sessions are disabled by default in 9.0 (#216091)
Updating search session settings docs to indicate that `.enable` is now
set to false by default.

Rel: https://github.com/elastic/kibana/issues/205814
2025-03-27 09:44:06 +01:00
Paulina Shakirova
637c61aedd
Custom link colour option for top banner (#214241)
This PR resolves [Link color in banner shown in blue and not the defined
color](https://github.com/elastic/kibana/issues/206266) issue.

Now there is a new option added that applies custom color specifically
for links, and can be fully customized.

- Updated documentation
  - in Cloud
  - advanced-settings
  - configuration
- Added to plugins
  - kibana_usage
  - telemetry
- Implemented new 'linkColor' property for the banners
- Updated functional tests
2025-03-25 20:26:35 +01:00
Lisa Cawley
3b2df8935b
[DOCS] Consolidate and clean up Kibana settings (part 1) (#214934) 2025-03-18 11:37:40 -07:00
Liam Thompson
53e568ebf8
[DOCS] Comment out broken link (#214371)
Chicken and egg breaking
3870802753

Will circle back and uncomment once that's merged
2025-03-13 14:00:46 +00:00
Colleen McGinnis
1814c60017
[docs] Migrate docs from AsciiDoc to Markdown (#212558)
Migrate docs from AsciiDoc to Markdown. The preview can be built after
#212557 is merged.

@florent-leborgne please tag reviewers, add the appropriate label(s),
and take this out of draft when you're ready.

Note: More files are deleted than added here because the content from
some files was moved to
[elastic/docs-content](https://github.com/elastic/docs-content).

**What has moved to
[elastic/docs-content](https://github.com/elastic/docs-content)?**

Public-facing narrative and conceptual docs have moved. Most can now be
found under the following directories in the new docs:
- explore-analyze: Discover, Dashboards, Visualizations, Reporting,
Alerting, dev tools...
- deploy-manage: Stack management (Spaces, user management, remote
clusters...)
- troubleshooting: .... troubleshooting pages

**What is staying in the Kibana repo?**

- Reference content (= anything that is or could be auto-generated):
Settings, syntax references
- Release notes
- Developer guide

---------

Co-authored-by: Florent Le Borgne <florent.leborgne@elastic.co>
2025-03-04 14:56:07 +01:00