Author: sbyd2umjwvnz

  • transformer-oembed

    @remark-embedder/transformer-oembed

    @remark-embedder transformer for oEmbed supported links


    Build Status Code Coverage version downloads MIT License All Contributors PRs Welcome Code of Conduct

    The problem

    You’re using @remark-embedder/core to automatically convert URLs in your markdown to the embedded version of those URLs and want to have a transform for providers that support an oEmbed API. Learn more about oEmbed from oembed.com

    This solution

    This is a @remark-embedder transform for supported oembed API providers. Find the list of supported providers on oembed.com.

    Table of Contents

    Installation

    This module is distributed via npm which is bundled with node and should be installed as one of your project’s dependencies:

    npm install @remark-embedder/transformer-oembed

    Usage

    import remarkEmbedder from '@remark-embedder/core'
    import oembedTransformer from '@remark-embedder/transformer-oembed'
    // or, if you're using CommonJS require:
    // const {default: oembedTransformer} = require('@remark-embedder/transformer-oembed')
    import remark from 'remark'
    import html from 'remark-html'
    
    const exampleMarkdown = `
    # My favorite YouTube video
    
    [This](https://www.youtube.com/watch?v=dQw4w9WgXcQ) is a great YouTube video.
    Watch it here:
    
    https://www.youtube.com/watch?v=dQw4w9WgXcQ
    
    Isn't it great!?
    `
    
    async function go() {
      const result = await remark()
        .use(remarkEmbedder, {
          transformers: [oembedTransformer],
        })
        .use(html)
        .process(exampleMarkdown)
    
      console.log(result.toString())
    }
    
    go()

    This will result in:

    <h1>My favorite YouTube video</h1>
    <p>
      <a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ">This</a> is a great
      YouTube video. Watch it here:
    </p>
    <iframe
      width="200"
      height="113"
      src="https://www.youtube.com/embed/dQw4w9WgXcQ?feature=oembed"
      frameborder="0"
      allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
      allowfullscreen
    ></iframe>
    <p>Isn't it great!?</p>

    Config

    Some oembed providers offer special configuration via query parameters. You can provide those via config:

    // ...
    import type {Config} from '@remark-embedder/transformer-oembed'
    
    // ...
    
    async function go() {
      const result = await remark()
        .use(remarkEmbedder, {
          transformers: [
            [
              oembedTransformer,
              {params: {theme: 'dark', dnt: true, omit_script: true}} as Config,
            ],
          ],
        })
        .use(html)
        .process(`https://twitter.com/kentcdodds/status/783161196945944580`)
    
      console.log(result.toString())
    }
    
    // ...

    That results in (notice the data- attributes which are specific to twitter’s oEmbed API):

    <blockquote class="twitter-tweet" data-dnt="true" data-theme="dark">
      <p lang="en" dir="ltr">
        I spent a few minutes working on this, just for you all. I promise, it wont
        disappoint. Though it may surprise 🎉<br /><br />🙏
        <a href="https://t.co/wgTJYYHOzD">https://t.co/wgTJYYHOzD</a>
      </p>
      — Kent C. Dodds (@kentcdodds)
      <a
        href="https://twitter.com/kentcdodds/status/783161196945944580?ref_src=twsrc%5Etfw"
        >October 4, 2016</a
      >
    </blockquote>

    This could also be used to provide an access token for providers that require this (like Instagram).

    Config as a function

    You can also provide configuration as a function so you can determine what configuration to give based on the provider and/or the URL. Like so:

    const oembedConfig: Config = ({url, provider}) => {
      if (provider.provider_name === 'Instagram') {
        return {
          params: {access_token: '{app-id}|{client-token}'},
        }
      }
    }
    const remarkEmbedderConfig = {
      transformers: [[oembedTransformer, oembedConfig]],
    }
    // ... etc...

    Inspiration

    It’s a long story… Check out the inspiration on @remark-embedder/core

    Other Solutions

    • remark-oembed: This one requires client-side JS to work which was unacceptable for our use cases.

    Issues

    Looking to contribute? Look for the Good First Issue label.

    🐛 Bugs

    Please file an issue for bugs, missing documentation, or unexpected behavior.

    See Bugs

    💡 Feature Requests

    Please file an issue to suggest new features. Vote on feature requests by adding a 👍. This helps maintainers prioritize what to work on.

    See Feature Requests

    Contributors ✨

    Thanks goes to these people (emoji key):


    Kent C. Dodds

    💻 📖 🚇 ⚠️

    Michaël De Boey

    💻 📖 🚧

    This project follows the all-contributors specification. Contributions of any kind welcome!

    LICENSE

    MIT

    Visit original content creator repository https://github.com/remark-embedder/transformer-oembed
  • devmap

    Карта развития веб-разработчика Tweet

    Содержание


    Каждый уважающий себя разработчик должен знать

    Книги

    Это — книги «на все времена». Лучшие в своем роде и важные для программистов любых направлений.


    Английский язык

    Зачем – большинство лучших курсов, справочных и учебных материалов доступно именно на английском языке. Если возникают трудности, то со знанием английского языка выше шансы найти ответ во всемирной паутине. Также если хотите работать в крутой престижной кампании, то без английского никак.

    • Полезные ресурсы:

    Архитектура компьютера

    Цель – познакомиться с концептуальной структурой вычислительных машин.


    Linux, командная строка Bash

    Цель – понять как работают операционные системы. Научиться базовому администрированию.


    Структуры данных

    Структуры данных — программная единица, позволяющая хранить и обрабатывать множество однотипных и/или логически связанных данных в вычислительной технике. Данные можно представить по-разному. В зависимости от того, что это за данные и что вы собираетесь с ними делать, одно представление подойдёт лучше других.

    Рекомендуется ознакомиться с алгоритмами хотя бы на базововм уровне. Так как структуры данных реализованы с помощью алгоритмов, алгоритмы – с помощью структур данных.


    HTML & CSS


    Объектно-ориентированное программирование


    Функциональное программирование


    Системы управления версиями


    Протокол HTTP

    Цель – понять, как браузер взаимодействует с веб-сервером.


    Тестирование


    Безопасность сайтов


    Тайм-менеджмент

    Тайм-менеджмент – технология организации времени и повышения эффективности его использования.

    Методы:

    • Метод «Помидора»
    • Метод Парето
    • Метод «Альп»
    • Матрица Эйзенхауэра

    Можно использовать один или несколько методов или разработать свой метод. Главное, чтобы он был удобен и реально приносил пользу.


    Карта развития Back-end разработчика

    Алгоритмы


    Серверные языки программирования

    Цель – освоить несколько серверных языков программирования.

    Нельзя останавливаться на одном языке, так как у вас может появиться ‘JAVA головного мозга’ – неспособность думать за пределами своего языка программирования.

    Лозунг: нужно программировать не на языке программирования, а используя его.


    Паттерны программирования


    Принципы программирования


    Регулярные выражения


    SQL


    Проектирование баз данных


    Фреймворки

    Для разных языков программирования существуют разные фреймворки, не нужно изучать всё сразу, необходимо взять несколько фреймворков за основу.


    Пакетный менеджер


    Устройство веб-серверов и способы взаимодействия


    Развертывание проектов


    Карта развития Front-end разработчика

    JavaScript

    • Познакомиться с такими понятиями как:

      • Переменные
      • Типы данных
      • Функции
      • Рекурсия
      • Замыкания
      • Область видимости
      • Объекты
      • События
      • DOM
    • Документации, книги:


    Адаптивный/отзывчивый веб-дизайн


    JavaScript библиотеки

    Цель – познакомиться с наиболее популярными библиотеками JavaScript. Знать где и когда их применять.

    Список библиотек:

    Список наиболее популярных библиотек есть на Javascripting


    Препроцессоры CSS


    Сборщик проектов

    Сборщик проектов — небольшое приложение, которое используется для автоматизации скучных и рутинных задач, которые приходится постоянно выполнять в процессе разработки проекта. Такие задачи включают в себя, к примеру, запуск модульных тестов, конкатенацию файлов, минификацию, препроцессинг CSS.


    Пакетный менеджер


    CSS фреймворки


    JavaScript фреймворки

    Существуют разные фреймворки, не нужно изучать всё сразу, необходимо взять несколько фреймворков за основу.

    Список фреймворков:


    Одностраничное приложение

    Одностраничное приложение или SPA (single page application) – сайт или веб-приложение, использующий единственный HTML-документ как оболочку для всех веб-страниц и организующий взаимодействие с пользователем через динамически подгружаемые HTML, CSS, JavaScript, обычно посредством AJAX.

    Visit original content creator repository https://github.com/zualex/devmap
  • 2019-talks

    • All talks are in english.
    • You can send feedback and love to speakers on their twitter account

    Keynote

    Slides
    Video

    By Fabien Potencier
    github @fabpot
    twitter @fabpot


    HTTP/3: It’s all about the transport!

    Description
    The announcement of HTTP/3 at the start of November 2018 may have come as a surprise for a lot of us.

    Indeed, compared to the 8 years that separated HTTP/1.1 et HTTP/2, this announcement came only 4 years after the release of HTTP/2.

    But the biggest surprise is under the hood, with a replacement of the transport layer.

    In this talk, we will explain why this version 3 of the HTTP protocol has been designed, especially around the latency topic.

    We will cover as well how technically this version works, and what it will bring to our applications, and what are the challenges that will need to be addressed, in order to fully benefit from this new version of the protocol that runs the Web.

    Slides
    Video

    By Benoit Jacquemont
    github @BitOne
    twitter @BJacquemont


    How to contribute to Symfony and why you should give it a try

    Description
    I started contributing actively to Symfony three years ago. Not only is it a way to thank the project, but it’s also an immense source of knowledge and communication for me. I would like to share my experience and to encourage contributions to Symfony.

    What we’ll discuss:

    • how participation in an open-source project makes you a better developer;
    • easy steps to join the Symfony ecosystem;
    • where to get an idea for a pull request;
    • branches and roadmap;
    • coding standards, conventions and backward compatibility;
    • rebase flow;
    • review process.

    Slides
    Video

    By Valentin Udaltsov
    github @vudaltsov
    twitter @vudaltsov


    A view in the PHP Virtual Machine

    Description
    This talk is about how PHP works. We’ll learn together how PHP compiles, optimizes then executes your scripts, both in the Web environment and CLI apps. We’ll dive into PHP’s source code – written in C – to extract some parts of interest and study them to better understand PHP’s behaviors as well as best practices in terms of performances (CPU cycles and memory allocations).

    Slides
    Video

    By Julien Pauli
    github @jpauli
    twitter @julienPauli


    How Doctrine caching can skyrocket your application

    Description
    When people talk about Doctrine (or any ORM for that matter), the performance issue always comes up fairly quickly. Besides the fact that Doctrine will help you develop faster, so a little overhead doesn’t really matter, there are numerous options to increase the performance of the application.

    By understanding how the system works in the first place, a lot of issues can be avoided right away.

    When you have done everything to avoid these pitfalls, you can bring in the big guns: caching. Doctrine has several caching mechanism and since Doctrine 2.5 “Second Level Cache” was added to our toolbox. After this talk, you should know what the impact is of every cache and how to use them.

    Slides
    Video

    By Jachim Coudenys
    github @coudenysj
    twitter @coudenysj


    Using the Workflow component for e-commerce

    Description
    We got the task to make an order API, from open order, to delivered, with payments in between and after. So there are naturally a lot of states, and a lot of transitions where we needed to calculate the prices correctly and handle credit card transfers. Keeping track of all of this, and when we need to do what, ensuring that an order is always up to date, and that it has the data it needs, and that we send good error messages when a user can not do an action, was a challenge for us until we discovered the workflow component.

    This is a real happy use case story where I will show you how we did this, and how much more straightforward it was for us to build an otherwise complex system using the workflow component.

    Slides
    Video

    By Michelle Sanver
    github @michellesanver
    twitter @michellesanver


    Crazy Fun Experiments with PHP (Not for Production)

    Description
    I’ll show you the crazy things you can do in PHP with streams and autoloader overloading to write your own language features. I’ll also show you how you can supercharge your Symfony applications using aspect-orientated programming or encrypt source code on-the-fly using only PHP. As if that wasn’t enough, we’ll go even further and make PHP a polyglot language by importing esoteric language scripts! These aren’t your average hacks and shouldn’t be run in production… but let’s explore these concepts as fun experiments so you’ll never think of PHP as boring again!

    Slides
    Video Code

    By Zan Baldwin
    github @zanbaldwin
    twitter @ZanBaldwin


    Hexagonal Architecture with Symfony

    Description
    Symfony offers many excellent components for your web and console applications. But of course, you still have to implement your own application logic, create your own domain models, and write your own tests. So Symfony has its place, but it’s not going to be everywhere in your application.

    In this talk I will explain an architectural style called “Hexagonal Architecture”, which will help you structure your applications in such a way that you can focus most of your development effort on the core of your application, designing it in a way that makes its production code sustainable and easy to test.

    Slides
    Video

    By Matthias Noback
    github @matthiasnoback
    twitter @matthiasnoback


    Crawling the Web with the New Symfony Components

    Description
    When developing an application, a common feature we need to implement is gathering data from other sources. These data are available in various forms, usually unstructured, and behind some JS application, making them harder to reach.

    To make things worse, as the application evolves, we need to get more data, from even more sources. But don’t worry, things can be easier!

    In this talk we’ll use the Symfony’s HttpClient, Messenger and Panther to build a crawler, first as a simple console application, then evolving to a distributed one.

    Slides
    Video

    By Adiel Cristo
    github @adielcristo
    twitter @adielcristo


    Adding Event Sourcing to an existing PHP project (for the right reasons)

    Description
    “Event Sourcing”, along with “CQRS”, have recently become trending terms, and now there is so much theory, blog posts and talks about them.

    However, most of these deal with the problem starting from an utopian assumption: having to write a project from scratch, but at the same time with a high domain complexity right from the start, enough to justify the use of a complex technique like event sourcing and CQRS, which carry a fair amount of inherent complexity. But the reality greatly differs: projects are born from small and simple prototypes, and they accumulate complexity only with time, growth and evolution of specifications and features.

    This talk is a case history in which I will tell you (with little theory and a lot of practical examples) how we decided to add event sourcing to an already existing project (without eradicating the rest or rewriting it), to solve a specific problem (reporting and its history) for which this methodology proved to be the perfect solution.

    Slides
    Video

    By Alessandro Lai
    github @Jean85
    twitter @AlessandroLai


    HYPErmedia: leveraging HTTP/2 and Symfony for better and faster web APIs

    Description
    Over the years, several formats have been created to fix performance bottlenecks of web APIs: the n+1 problem, over fetching, under fetching… The current hipster solution for these problems is GraphQL. It’s a very smart network hack for HTTP/1, but a hack that is not necessary anymore with HTTP/2 and HTTP/3.

    The new versions of the protocol of the web now have native capabilities allowing to create fast and idiomatic web APIs: multiplexing, server push, headers deduplication, compression, persistent connections (Mercure)… Leveraging HTTP/2 and HTTP/3 unveils the true powers of the web (hypermedia architecture) with no compromises with performance.

    During this presentation, we’ll learn how to design our APIs to be able to maximize the benefits provided by HTTP/2. Better, Symfony already contains all the tools you need to create (WebLink, API Platform) and consume (HttpClient) such APIs. We will discover these gems together.

    HATEOAS is the new hype!

    Slides
    Video

    By Kévin Dunglas
    github @dunglas
    twitter @dunglas


    PHP, Symfony and Security

    Description
    Have you ever tried talking to someone about using PHP in secure applications? It’s nothing new that we deal with prejudice against PHP every day and the situation is even worse when we talk about security. The latest versions of PHP provide security tools and modern cryptography and Symfony itself make its efforts to deliver robust security features that are simple to implement. We’ll learn about the latest language and framework initiatives in this regard and check out short and quick tips for boosting you application’s security.

    Slides
    Video

    By Diana Ungaro Arnos
    github @dianaarnos
    twitter @dianaarnos


    What happens when I press enter?

    Description
    As a technical interviewer, one of the questions I like to ask the most is “what happens when I write www.example.com in the browser and then press enter?”. The answer reveals a lot about the interviewee’s understanding of a vast number of technologies that fringes web development.

    In this talk, I will go through exactly what happens, down to excruciating detail, so that you will be better prepared for your future job interview.

    Slides
    Video

    By Tobias Sjösten
    github @tobiassjosten
    twitter @tobiassjosten


    Configuring Symfony – from localhost to High Availability

    Description
    All apps need configuration: the database host, background color of your client’s theme, API token to some service, number of items per page on the blog, etc. Where should all this configuration live? Operating systems, PHP and Symfony provide many options: environment variables, .env files, plain PHP constants, dependency injection parameters, key-value databases, “secrets” vaults, etc. You have many choices! And with great choices comes great responsibility… and complexity!

    In this talk, we’ll review all the ways to store configuration, which is best for each “type” of configuration and the benefits and drawbacks of each. We’ll also talk about Symfony 4.4’s new “secrets vault” as one of the ways to store sensitive settings. By the end, you’ll be ready to configure anything from localhost up to a cluster of high resiliency microservices.

    Slides
    Video

    By Nicolas Grekas
    github @nicolas-grekas
    twitter @nicolasgrekas


    HTTP Caching with Symfony 101

    Description
    HTTP caching is a powerful technique to improve response times for site visitors, make more efficient use of bandwidth and reduce server load. We will have a look at the basic concepts, the different caching strategies and HTTP headers used to implement them. I will then show you a few ways how to implement HTTP level caching in your Symfony application, how to leverage the HTTP Cache included in the framework and resolve the mystery around ESI.

    My hope is that when you return to work on monday, you will bring some new tools to your project that you can start using right away.

    Slides
    Video Code

    By Matthias Pigulla
    github @mpdude
    twitter @mpdude_de


    How fitness helps you become a better developer

    Description
    We often think of technical skills as the way to level up as developers, but we’re not (yet) brains-in-a-vat. Our body and physical health are crucial to be able to work well as developers.

    In this talk I speak both about the science behind fitness and nutrition, and my personal journey of losing over 70 kgs, starting to go to the gym, how it affected me as a developer, as well as the shocking secret behind what happened to the Sound of Symfony podcast.

    Slides
    Video

    By Magnus Nordlander
    github @magnusnordlander
    twitter @drrotmos


    PHPUnit Best Practices

    Description
    While PHPUnit is not difficult to set up and writing tests with it is easy, you will get better results and save development time if you know the tips and tricks to leverage PHPUnit more effectively. This session, presented by the creator of PHPUnit, teaches best practices you can use to ensure that your unit testing effort is efficiently implemented.

    Slides
    Video

    By Sebastian Bergmann
    github @sebastianbergmann
    twitter @s_bergmann


    Using API Platform to build ticketing system

    Description
    Why is API platform a way to go and the new standard in developing apps? In this talk, I want to show you some real examples that we built using API platform including a ticketing system for the world’s biggest bicycle marathon and a social network that is a mixture of both Tinder and Facebook Messenger.

    We had to tackle problems regarding the implementation of tax laws in 18 different countries, dozens of translations (including Arabic), multiple role systems, different timezones, overall struggle with a complicated logic with an infinite number of branches, and more. Are you interested? Sign up for the talk.

    Slides
    Video

    By Antonio Peric-Mazar
    github @antonioperic
    twitter @antonioperic


    Make the Most out of Twig

    Description
    Twig is the most powerful templating engine in the PHP world that enables us to create highly complex projects with hundreds of multi-level extended templates, thousands of blocks, functions, filters, tests, and macros. It also offers a sandbox, a unique but not a widely used feature that is creating secure user-editable templates. In addition, there are a number of handy built-in and external debugging tools available in the Twig ecosystem to simplify the day-to-day work process for a Twig designer.

    In this presentation, I will talk about how extensively we use Twig in a complex open-source e-commerce project.

    Slides
    Video

    By Andrii Yatsenko
    github @anyt
    twitter @Yatsenco


    Mental Health in the Workplace

    Description
    Mental health is an important part of life, yet mental illness is big. Perhaps bigger than you might think when looking around you. In this talk, you’ll be introduced to some basics on mental health and mental illness, and given some tips and handholds on how to handle mental illness on the work floor.

    Slides
    Video

    By Stefan Koopmanschap
    github @skoop
    twitter @skoop


    Importing bad data – Outputting good data with Symfony

    Description
    The role of our API in Switzerland is to consume a lot of data that was not meant for a digital age and to transform it into beautiful output, for one of the biggest retailer in Switzerland. This is a journey of consuming a lot of data and APIs from different sources and in different formats. Some of them made us laugh, some of us got migraines. We built a smooth architecture to consume and output data. I am proud of our architecture that we seamlessly upgraded to keep the latest versions, now Symfony 4 along the way. I want to share with you how we managed to keep this API up to date for over 5 years and the architecture that we use to make it happen.

    Slides
    Video

    By Michelle Sanver
    github @michellesanver
    twitter @michellesanver


    Symfony Serializer: There and back again

    Description
    When developing APIs you sometimes need to return the same object with different representations. Furthermore, an object can be complex due to its relationships with other objects, making the serialization process such a hard task.

    The Symfony Serializer Component makes it possible to manage how you want to serialize objects for JSON, XML or other formats. Also, you can manage responses using serialization groups, choosing which properties you want, handling serialization depth and much more.

    Slides
    Video

    By Juciellen Cabrera
    github @jucabrera
    twitter @jucycabrera


    Eeek, my tests are mutating!

    Description
    Writing tests is nice, but how are you sure that your tests cover all use cases? Code coverage can give false positive metrics. A new way of working that goes by the name of mutation testing has gained a lot of popularity lately. This talk will explain you what it is, how you can integrate it and contains a demo over the basics of mutation testing with infection and phpspec.

    Slides
    Video

    By Lander Vanderstraeten
    github @Landerstraeten
    twitter @landerstraeten


    Integrating performance management in your development cycle

    Description
    Good performance is crucial for online businesses and it should be taken very seriously. While this is common knowledge, it is usually not prioritized in development cycles. This leads to higher development cost as teams found themselves in situations of fire-fighting. By integrating performance management early in the development process, the cost are reduced, chances of performance regression are lessened, same as the business risks. Using Blackfire, we will see why performance management should be integrated in a SymfonyCloud project early in every environments from development to testing to production.

    Slides
    Video

    By Marc Weistroff
    github @marcw


    Demystifying React JS for Symfony developers

    Description
    The world of Javascript is vast and exciting… but it can also be quite scary! It is an innovative world in which new technologies appear all the time, which can make it difficult for developers to keep up to date. One of the most famous of these technologies is probably React JS. It changed the way we conceive User Interfaces, both in the browser and in mobile applications. But understanding it can be challenging. Let’s demystify it together so that you can enter the world of Javascript with confidence!

    Slides
    Video

    By Titouan Galopin
    github @tgalopin
    twitter @titouangalopin


    Head first into Symfony Cache, Redis & Redis Cluster

    Description
    Symfony Cache has been around for a few releases. But what is happening behind the scenes? Talk focuses on how is it working, down to detail level on Redis for things like datatypes, Redis Cluster sharding logic, how it differs from Memcached and more.

    Hopefully you’ll learn how you can make sure to get optimal performance, what opportunities exists, and which pitfalls to try to avoid.

    Slides
    Video

    By Andre Rømcke
    github @andrerom
    twitter @andrerom


    Prime Time with Messenger: Queues, Workers & more Fun!

    Description
    In Symfony 4.4, Messenger will lose its experimental label and officially become stable! In this talk, we’ll go through Messenger from the ground-up: learning about messages, message handlers, transports and how to consume messages asynchronously via worker commands. Everything you need to make your app faster by delaying work until later.

    We’ll also talk about the many new features that were added to Messenger since Symfony 4.3, like retries, the failure transport and support for using Doctrine and Redis as transports.

    Let’s get to work with Messenger!

    Slides
    Video

    By Ryan Weaver
    github @weaverryan
    twitter @weaverryan


    SymfonyCloud: the infrastructure of the Symfony ecosystem

    Description
    You don’t know it yet but you are already using SymfonyCloud every day! Since 2017, the infrastructure of the Symfony community gradually migrated to SymfonyCloud. Let me show you what happens behind the scene and how we leverage every SymfonyCloud features to move faster.

    Slides
    Video

    By Tugdual Saunier
    github @tucksaun
    twitter @tucksaun


    Together towards an AI, NEAT plus ultra

    Description
    You’ve heard about AI for some time. But it remains obscure for you. How does it work, what is behind this word? If for you, reading white papers or doctoral papers is not your thing, that the Tensorflow doc is just a big pile of words for you, and if you’ve seen unclear presentations using the same vocabulary without really giving you an idea of how it works and how to implement an AI at home… This presentation is for you. At its end, you will be able to play with an AI, simple, but that will serve as a gateway to the beautiful world of machine-learning.

    Slides
    Video

    By Grégoire Hébert
    github @GregoireHebert
    twitter @gheb_dev


    Building really fast applications

    Description
    Let us talk about performance. What can we do to make an application run faster? What should we be considering when starting a new application? There are some quick fixes that I will quickly cover. But to get down to really fast response times requires hard work. I will give my best ideas and tricks for fast apps.

    I will show how we can build applications that responds in less that 15ms and then work towards even faster than that.

    No, this is not a Varnish talk.

    Slides
    Video

    By Tobias Nyholm
    github @Nyholm
    twitter @TobiasNyholm


    Everything you wanted to know about Sylius, but didn’t find time to ask

    Description
    Sylius is an open-source eCommerce platform based on Symfony 4, which reached version 1.6 last September. Is there any reason why should you check Sylius if you are not developing eCommerce websites? What are the reasons to choose Sylius? For who is Sylius designed for? I will answer these questions and give some insight over the newest changes in the platform.

    Slides
    Video

    By Łukasz Chruściel
    github @lchrusciel
    twitter @lukaszchrusciel


    DevCorp: Choose Your Own Adventure

    Description
    You’re a software development consultant called into DevCorp with a mission. What started as a hip, informal startup now has investor demands to meet. And they’re counting on you to help them become a scale-up. How do you grow the existing team and maintain the codebase?

    This interactive talk, intended for any developer of any level, will give you some valuable technical and soft skills to take with you on your real-life professional journey. Using a voting system, the audience decides… and has to live with the consequences. Based on a mix of personal experience, agile methodology, and software design principles, this story has several possible endings.

    Will you help lift your team’s performance or run DevCorp into the ground?

    Slides
    Video

    By Pauline Vos
    github @paulinevos
    twitter @vanamerongen


    One Year of Symfony

    Slides
    Video

    By Zan Baldwin
    github @zanbaldwin
    twitter @ZanBaldwin

    And Nicolas Grekas
    github @nicolas-grekas
    twitter @nicolasgrekas




    Unconf Talks


    A love story starring Symfony and Domain-Driven Design

    Description
    This is the story of how I discovered Domain-Driven Design, what happened when I tried to apply it to a Symfony framework project, and what are the key takeaways.

    Slides

    By Romaric Drigon
    github @romaricdrigon
    twitter @romaric


    10 lessons from symfony ecosystem that you can apply to your team/project

    Description
    What I want to show you? That you can benefit not only from the symfony code itself or presentations on SymfonyCon. There’s more.

    Slides

    By Jerzy Zawadzki
    github @jzawadzki
    twitter @jerzy_zawadzki


    Schema Design for E-Commerce

    Description
    Replacing Transactions with MongoDB

    Slides

    By Andreas Braun
    github @alcaeus
    twitter @alcaeus

    Visit original content creator repository https://github.com/SymfonyCon/2019-talks
  • 2019-talks

    • All talks are in english.
    • You can send feedback and love to speakers on their twitter account

    Keynote

    Slides
    Video

    By Fabien Potencier
    github @fabpot
    twitter @fabpot


    HTTP/3: It’s all about the transport!

    Description
    The announcement of HTTP/3 at the start of November 2018 may have come as a surprise for a lot of us.

    Indeed, compared to the 8 years that separated HTTP/1.1 et HTTP/2, this announcement came only 4 years after the release of HTTP/2.

    But the biggest surprise is under the hood, with a replacement of the transport layer.

    In this talk, we will explain why this version 3 of the HTTP protocol has been designed, especially around the latency topic.

    We will cover as well how technically this version works, and what it will bring to our applications, and what are the challenges that will need to be addressed, in order to fully benefit from this new version of the protocol that runs the Web.

    Slides
    Video

    By Benoit Jacquemont
    github @BitOne
    twitter @BJacquemont


    How to contribute to Symfony and why you should give it a try

    Description
    I started contributing actively to Symfony three years ago. Not only is it a way to thank the project, but it’s also an immense source of knowledge and communication for me. I would like to share my experience and to encourage contributions to Symfony.

    What we’ll discuss:

    • how participation in an open-source project makes you a better developer;
    • easy steps to join the Symfony ecosystem;
    • where to get an idea for a pull request;
    • branches and roadmap;
    • coding standards, conventions and backward compatibility;
    • rebase flow;
    • review process.

    Slides
    Video

    By Valentin Udaltsov
    github @vudaltsov
    twitter @vudaltsov


    A view in the PHP Virtual Machine

    Description
    This talk is about how PHP works. We’ll learn together how PHP compiles, optimizes then executes your scripts, both in the Web environment and CLI apps. We’ll dive into PHP’s source code – written in C – to extract some parts of interest and study them to better understand PHP’s behaviors as well as best practices in terms of performances (CPU cycles and memory allocations).

    Slides
    Video

    By Julien Pauli
    github @jpauli
    twitter @julienPauli


    How Doctrine caching can skyrocket your application

    Description
    When people talk about Doctrine (or any ORM for that matter), the performance issue always comes up fairly quickly. Besides the fact that Doctrine will help you develop faster, so a little overhead doesn’t really matter, there are numerous options to increase the performance of the application.

    By understanding how the system works in the first place, a lot of issues can be avoided right away.

    When you have done everything to avoid these pitfalls, you can bring in the big guns: caching. Doctrine has several caching mechanism and since Doctrine 2.5 “Second Level Cache” was added to our toolbox. After this talk, you should know what the impact is of every cache and how to use them.

    Slides
    Video

    By Jachim Coudenys
    github @coudenysj
    twitter @coudenysj


    Using the Workflow component for e-commerce

    Description
    We got the task to make an order API, from open order, to delivered, with payments in between and after. So there are naturally a lot of states, and a lot of transitions where we needed to calculate the prices correctly and handle credit card transfers. Keeping track of all of this, and when we need to do what, ensuring that an order is always up to date, and that it has the data it needs, and that we send good error messages when a user can not do an action, was a challenge for us until we discovered the workflow component.

    This is a real happy use case story where I will show you how we did this, and how much more straightforward it was for us to build an otherwise complex system using the workflow component.

    Slides
    Video

    By Michelle Sanver
    github @michellesanver
    twitter @michellesanver


    Crazy Fun Experiments with PHP (Not for Production)

    Description
    I’ll show you the crazy things you can do in PHP with streams and autoloader overloading to write your own language features. I’ll also show you how you can supercharge your Symfony applications using aspect-orientated programming or encrypt source code on-the-fly using only PHP. As if that wasn’t enough, we’ll go even further and make PHP a polyglot language by importing esoteric language scripts! These aren’t your average hacks and shouldn’t be run in production… but let’s explore these concepts as fun experiments so you’ll never think of PHP as boring again!

    Slides
    Video Code

    By Zan Baldwin
    github @zanbaldwin
    twitter @ZanBaldwin


    Hexagonal Architecture with Symfony

    Description
    Symfony offers many excellent components for your web and console applications. But of course, you still have to implement your own application logic, create your own domain models, and write your own tests. So Symfony has its place, but it’s not going to be everywhere in your application.

    In this talk I will explain an architectural style called “Hexagonal Architecture”, which will help you structure your applications in such a way that you can focus most of your development effort on the core of your application, designing it in a way that makes its production code sustainable and easy to test.

    Slides
    Video

    By Matthias Noback
    github @matthiasnoback
    twitter @matthiasnoback


    Crawling the Web with the New Symfony Components

    Description
    When developing an application, a common feature we need to implement is gathering data from other sources. These data are available in various forms, usually unstructured, and behind some JS application, making them harder to reach.

    To make things worse, as the application evolves, we need to get more data, from even more sources. But don’t worry, things can be easier!

    In this talk we’ll use the Symfony’s HttpClient, Messenger and Panther to build a crawler, first as a simple console application, then evolving to a distributed one.

    Slides
    Video

    By Adiel Cristo
    github @adielcristo
    twitter @adielcristo


    Adding Event Sourcing to an existing PHP project (for the right reasons)

    Description
    “Event Sourcing”, along with “CQRS”, have recently become trending terms, and now there is so much theory, blog posts and talks about them.

    However, most of these deal with the problem starting from an utopian assumption: having to write a project from scratch, but at the same time with a high domain complexity right from the start, enough to justify the use of a complex technique like event sourcing and CQRS, which carry a fair amount of inherent complexity. But the reality greatly differs: projects are born from small and simple prototypes, and they accumulate complexity only with time, growth and evolution of specifications and features.

    This talk is a case history in which I will tell you (with little theory and a lot of practical examples) how we decided to add event sourcing to an already existing project (without eradicating the rest or rewriting it), to solve a specific problem (reporting and its history) for which this methodology proved to be the perfect solution.

    Slides
    Video

    By Alessandro Lai
    github @Jean85
    twitter @AlessandroLai


    HYPErmedia: leveraging HTTP/2 and Symfony for better and faster web APIs

    Description
    Over the years, several formats have been created to fix performance bottlenecks of web APIs: the n+1 problem, over fetching, under fetching… The current hipster solution for these problems is GraphQL. It’s a very smart network hack for HTTP/1, but a hack that is not necessary anymore with HTTP/2 and HTTP/3.

    The new versions of the protocol of the web now have native capabilities allowing to create fast and idiomatic web APIs: multiplexing, server push, headers deduplication, compression, persistent connections (Mercure)… Leveraging HTTP/2 and HTTP/3 unveils the true powers of the web (hypermedia architecture) with no compromises with performance.

    During this presentation, we’ll learn how to design our APIs to be able to maximize the benefits provided by HTTP/2. Better, Symfony already contains all the tools you need to create (WebLink, API Platform) and consume (HttpClient) such APIs. We will discover these gems together.

    HATEOAS is the new hype!

    Slides
    Video

    By Kévin Dunglas
    github @dunglas
    twitter @dunglas


    PHP, Symfony and Security

    Description
    Have you ever tried talking to someone about using PHP in secure applications? It’s nothing new that we deal with prejudice against PHP every day and the situation is even worse when we talk about security. The latest versions of PHP provide security tools and modern cryptography and Symfony itself make its efforts to deliver robust security features that are simple to implement. We’ll learn about the latest language and framework initiatives in this regard and check out short and quick tips for boosting you application’s security.

    Slides
    Video

    By Diana Ungaro Arnos
    github @dianaarnos
    twitter @dianaarnos


    What happens when I press enter?

    Description
    As a technical interviewer, one of the questions I like to ask the most is “what happens when I write www.example.com in the browser and then press enter?”. The answer reveals a lot about the interviewee’s understanding of a vast number of technologies that fringes web development.

    In this talk, I will go through exactly what happens, down to excruciating detail, so that you will be better prepared for your future job interview.

    Slides
    Video

    By Tobias Sjösten
    github @tobiassjosten
    twitter @tobiassjosten


    Configuring Symfony – from localhost to High Availability

    Description
    All apps need configuration: the database host, background color of your client’s theme, API token to some service, number of items per page on the blog, etc. Where should all this configuration live? Operating systems, PHP and Symfony provide many options: environment variables, .env files, plain PHP constants, dependency injection parameters, key-value databases, “secrets” vaults, etc. You have many choices! And with great choices comes great responsibility… and complexity!

    In this talk, we’ll review all the ways to store configuration, which is best for each “type” of configuration and the benefits and drawbacks of each. We’ll also talk about Symfony 4.4’s new “secrets vault” as one of the ways to store sensitive settings. By the end, you’ll be ready to configure anything from localhost up to a cluster of high resiliency microservices.

    Slides
    Video

    By Nicolas Grekas
    github @nicolas-grekas
    twitter @nicolasgrekas


    HTTP Caching with Symfony 101

    Description
    HTTP caching is a powerful technique to improve response times for site visitors, make more efficient use of bandwidth and reduce server load. We will have a look at the basic concepts, the different caching strategies and HTTP headers used to implement them. I will then show you a few ways how to implement HTTP level caching in your Symfony application, how to leverage the HTTP Cache included in the framework and resolve the mystery around ESI.

    My hope is that when you return to work on monday, you will bring some new tools to your project that you can start using right away.

    Slides
    Video Code

    By Matthias Pigulla
    github @mpdude
    twitter @mpdude_de


    How fitness helps you become a better developer

    Description
    We often think of technical skills as the way to level up as developers, but we’re not (yet) brains-in-a-vat. Our body and physical health are crucial to be able to work well as developers.

    In this talk I speak both about the science behind fitness and nutrition, and my personal journey of losing over 70 kgs, starting to go to the gym, how it affected me as a developer, as well as the shocking secret behind what happened to the Sound of Symfony podcast.

    Slides
    Video

    By Magnus Nordlander
    github @magnusnordlander
    twitter @drrotmos


    PHPUnit Best Practices

    Description
    While PHPUnit is not difficult to set up and writing tests with it is easy, you will get better results and save development time if you know the tips and tricks to leverage PHPUnit more effectively. This session, presented by the creator of PHPUnit, teaches best practices you can use to ensure that your unit testing effort is efficiently implemented.

    Slides
    Video

    By Sebastian Bergmann
    github @sebastianbergmann
    twitter @s_bergmann


    Using API Platform to build ticketing system

    Description
    Why is API platform a way to go and the new standard in developing apps? In this talk, I want to show you some real examples that we built using API platform including a ticketing system for the world’s biggest bicycle marathon and a social network that is a mixture of both Tinder and Facebook Messenger.

    We had to tackle problems regarding the implementation of tax laws in 18 different countries, dozens of translations (including Arabic), multiple role systems, different timezones, overall struggle with a complicated logic with an infinite number of branches, and more. Are you interested? Sign up for the talk.

    Slides
    Video

    By Antonio Peric-Mazar
    github @antonioperic
    twitter @antonioperic


    Make the Most out of Twig

    Description
    Twig is the most powerful templating engine in the PHP world that enables us to create highly complex projects with hundreds of multi-level extended templates, thousands of blocks, functions, filters, tests, and macros. It also offers a sandbox, a unique but not a widely used feature that is creating secure user-editable templates. In addition, there are a number of handy built-in and external debugging tools available in the Twig ecosystem to simplify the day-to-day work process for a Twig designer.

    In this presentation, I will talk about how extensively we use Twig in a complex open-source e-commerce project.

    Slides
    Video

    By Andrii Yatsenko
    github @anyt
    twitter @Yatsenco


    Mental Health in the Workplace

    Description
    Mental health is an important part of life, yet mental illness is big. Perhaps bigger than you might think when looking around you. In this talk, you’ll be introduced to some basics on mental health and mental illness, and given some tips and handholds on how to handle mental illness on the work floor.

    Slides
    Video

    By Stefan Koopmanschap
    github @skoop
    twitter @skoop


    Importing bad data – Outputting good data with Symfony

    Description
    The role of our API in Switzerland is to consume a lot of data that was not meant for a digital age and to transform it into beautiful output, for one of the biggest retailer in Switzerland. This is a journey of consuming a lot of data and APIs from different sources and in different formats. Some of them made us laugh, some of us got migraines. We built a smooth architecture to consume and output data. I am proud of our architecture that we seamlessly upgraded to keep the latest versions, now Symfony 4 along the way. I want to share with you how we managed to keep this API up to date for over 5 years and the architecture that we use to make it happen.

    Slides
    Video

    By Michelle Sanver
    github @michellesanver
    twitter @michellesanver


    Symfony Serializer: There and back again

    Description
    When developing APIs you sometimes need to return the same object with different representations. Furthermore, an object can be complex due to its relationships with other objects, making the serialization process such a hard task.

    The Symfony Serializer Component makes it possible to manage how you want to serialize objects for JSON, XML or other formats. Also, you can manage responses using serialization groups, choosing which properties you want, handling serialization depth and much more.

    Slides
    Video

    By Juciellen Cabrera
    github @jucabrera
    twitter @jucycabrera


    Eeek, my tests are mutating!

    Description
    Writing tests is nice, but how are you sure that your tests cover all use cases? Code coverage can give false positive metrics. A new way of working that goes by the name of mutation testing has gained a lot of popularity lately. This talk will explain you what it is, how you can integrate it and contains a demo over the basics of mutation testing with infection and phpspec.

    Slides
    Video

    By Lander Vanderstraeten
    github @Landerstraeten
    twitter @landerstraeten


    Integrating performance management in your development cycle

    Description
    Good performance is crucial for online businesses and it should be taken very seriously. While this is common knowledge, it is usually not prioritized in development cycles. This leads to higher development cost as teams found themselves in situations of fire-fighting. By integrating performance management early in the development process, the cost are reduced, chances of performance regression are lessened, same as the business risks. Using Blackfire, we will see why performance management should be integrated in a SymfonyCloud project early in every environments from development to testing to production.

    Slides
    Video

    By Marc Weistroff
    github @marcw


    Demystifying React JS for Symfony developers

    Description
    The world of Javascript is vast and exciting… but it can also be quite scary! It is an innovative world in which new technologies appear all the time, which can make it difficult for developers to keep up to date. One of the most famous of these technologies is probably React JS. It changed the way we conceive User Interfaces, both in the browser and in mobile applications. But understanding it can be challenging. Let’s demystify it together so that you can enter the world of Javascript with confidence!

    Slides
    Video

    By Titouan Galopin
    github @tgalopin
    twitter @titouangalopin


    Head first into Symfony Cache, Redis & Redis Cluster

    Description
    Symfony Cache has been around for a few releases. But what is happening behind the scenes? Talk focuses on how is it working, down to detail level on Redis for things like datatypes, Redis Cluster sharding logic, how it differs from Memcached and more.

    Hopefully you’ll learn how you can make sure to get optimal performance, what opportunities exists, and which pitfalls to try to avoid.

    Slides
    Video

    By Andre Rømcke
    github @andrerom
    twitter @andrerom


    Prime Time with Messenger: Queues, Workers & more Fun!

    Description
    In Symfony 4.4, Messenger will lose its experimental label and officially become stable! In this talk, we’ll go through Messenger from the ground-up: learning about messages, message handlers, transports and how to consume messages asynchronously via worker commands. Everything you need to make your app faster by delaying work until later.

    We’ll also talk about the many new features that were added to Messenger since Symfony 4.3, like retries, the failure transport and support for using Doctrine and Redis as transports.

    Let’s get to work with Messenger!

    Slides
    Video

    By Ryan Weaver
    github @weaverryan
    twitter @weaverryan


    SymfonyCloud: the infrastructure of the Symfony ecosystem

    Description
    You don’t know it yet but you are already using SymfonyCloud every day! Since 2017, the infrastructure of the Symfony community gradually migrated to SymfonyCloud. Let me show you what happens behind the scene and how we leverage every SymfonyCloud features to move faster.

    Slides
    Video

    By Tugdual Saunier
    github @tucksaun
    twitter @tucksaun


    Together towards an AI, NEAT plus ultra

    Description
    You’ve heard about AI for some time. But it remains obscure for you. How does it work, what is behind this word? If for you, reading white papers or doctoral papers is not your thing, that the Tensorflow doc is just a big pile of words for you, and if you’ve seen unclear presentations using the same vocabulary without really giving you an idea of how it works and how to implement an AI at home… This presentation is for you. At its end, you will be able to play with an AI, simple, but that will serve as a gateway to the beautiful world of machine-learning.

    Slides
    Video

    By Grégoire Hébert
    github @GregoireHebert
    twitter @gheb_dev


    Building really fast applications

    Description
    Let us talk about performance. What can we do to make an application run faster? What should we be considering when starting a new application? There are some quick fixes that I will quickly cover. But to get down to really fast response times requires hard work. I will give my best ideas and tricks for fast apps.

    I will show how we can build applications that responds in less that 15ms and then work towards even faster than that.

    No, this is not a Varnish talk.

    Slides
    Video

    By Tobias Nyholm
    github @Nyholm
    twitter @TobiasNyholm


    Everything you wanted to know about Sylius, but didn’t find time to ask

    Description
    Sylius is an open-source eCommerce platform based on Symfony 4, which reached version 1.6 last September. Is there any reason why should you check Sylius if you are not developing eCommerce websites? What are the reasons to choose Sylius? For who is Sylius designed for? I will answer these questions and give some insight over the newest changes in the platform.

    Slides
    Video

    By Łukasz Chruściel
    github @lchrusciel
    twitter @lukaszchrusciel


    DevCorp: Choose Your Own Adventure

    Description
    You’re a software development consultant called into DevCorp with a mission. What started as a hip, informal startup now has investor demands to meet. And they’re counting on you to help them become a scale-up. How do you grow the existing team and maintain the codebase?

    This interactive talk, intended for any developer of any level, will give you some valuable technical and soft skills to take with you on your real-life professional journey. Using a voting system, the audience decides… and has to live with the consequences. Based on a mix of personal experience, agile methodology, and software design principles, this story has several possible endings.

    Will you help lift your team’s performance or run DevCorp into the ground?

    Slides
    Video

    By Pauline Vos
    github @paulinevos
    twitter @vanamerongen


    One Year of Symfony

    Slides
    Video

    By Zan Baldwin
    github @zanbaldwin
    twitter @ZanBaldwin

    And Nicolas Grekas
    github @nicolas-grekas
    twitter @nicolasgrekas




    Unconf Talks


    A love story starring Symfony and Domain-Driven Design

    Description
    This is the story of how I discovered Domain-Driven Design, what happened when I tried to apply it to a Symfony framework project, and what are the key takeaways.

    Slides

    By Romaric Drigon
    github @romaricdrigon
    twitter @romaric


    10 lessons from symfony ecosystem that you can apply to your team/project

    Description
    What I want to show you? That you can benefit not only from the symfony code itself or presentations on SymfonyCon. There’s more.

    Slides

    By Jerzy Zawadzki
    github @jzawadzki
    twitter @jerzy_zawadzki


    Schema Design for E-Commerce

    Description
    Replacing Transactions with MongoDB

    Slides

    By Andreas Braun
    github @alcaeus
    twitter @alcaeus

    Visit original content creator repository https://github.com/SymfonyCon/2019-talks
  • logbus

    logbus

    a simple logger dedicated to JSON output

    背景

    我们在开发环境下的log一般输出到本地文件,或者stdout(再由supervisor写文件)。 在线上环境将log统一打到log服务器(logserver)上,然后运维解析tag分发到 s3 / elasticsearch/ thinkingdata 等。 从服务器输出到logserver有多种方法:

    • 直接输出到本地fluentd agent的socket中
    • 若机器部署在k8s上,则可以输出到stdout,然后由fluentd-bit采集文件和分发
    • 若机器部署在ec2上,则可以输出到stdout,然后由supervisor重定向到文件,运维对文件进行采集

    基础用法

    import "github.com/sandwich-go/logbus"
    import "gopkg.in/natefinch/lumberjack.v2"
    
    func MustInstallLogger() {
        defer logbus.Close()
    	//初始化
        logbus.Init(logbus.NewConf(
            logbus.WithDev(true),  //是否开发模式 false会输出json格式 ture的话会打印代颜色的易读log
            logbus.WithLogLevel(lv), // 对应zapcore.Level的枚举值
            logbus.WithWriteSyncer(zapcore.AddSync(&lumberjack.Logger{  //可以自定义日志的输出方式 默认的话是os.stdout
                Filename:   "./app.log", // 日志文件路径
                MaxSize:    10,          // 单个日志文件的最大大小,单位 MB
                MaxBackups: 10,          // 保留的旧日志文件数量
                MaxAge:     14,          // 保留的旧日志文件最大天数
                Compress:   false,       // 是否压缩旧日志文件
            })))
        
    	//设置全局字段
        logbus.SetGlobalFields([]logbus.Field{
            logbus.String("host_name", hostName),
            logbus.String("server_tag", tag),
            logbus.String("server_id", common.LocalNodeID),
            logbus.String("server_ip", xip.GetLocalIP()),
            logbus.Int64("server_birth", time.Now().Unix()),
        })
    	
    	// 基础使用
        logbus.Error("test log", logbus.String("key", "value"), ErrorField(errors.New("rrrrrr")))
        logbus.Info("test log", logbus.Int("key1", 123), zap.Bool("key2", true))
    
        // scope logger
        playerLogger := logbus.NewScopeLogger("Player", zap.String("playername", "zhangsong"), zap.Int("playerid", 123))
        guildLogger := logbus.NewScopeLogger("Guild", zap.String("guildname", "guild1"))
        playerLogger.Info("player gold", logbus.Int("money", 648))
        guildLogger.Info("guild gold", logbus.Int("money", 6480))
        
    	// queue
        q := logbus.NewQueue()
        q.Push(zap.Int("i", 1))
        q.Push(zap.Int("j", 2))
        logbus.Debug("msg", q.Retrieve()...)
    }

    配置说明

    // WithLogLevel 日志级别,默认 zap.DebugLevel
    func WithLogLevel(v zapcore.Level) ConfOption
    
    // WithDev 是否输出带颜色的易读log,默认关闭
    func WithDev(v bool) ConfOption
    
    // WithDefaultChannel 设置默认的dd_meta_channel
    func WithDefaultChannel(v string) ConfOption
    
    // WithDefaultTag 设置默认的tag
    func WithDefaultTag(v string) ConfOption
    
    // WithCallerSkip 等于zap.CallerSkip
    func WithCallerSkip(v int) ConfOption
    
    // WithStackLogLevel 是否输出log_xid,默认开启,打印stack的最低级别,默认ErrorLevel stack if level >= StackLogLevel
    func WithStackLogLevel(v zapcore.Level) ConfOption
    
    // WithBufferedStdout 输出stdout时使用 logbus.BufferedWriteSyncer
    func WithBufferedStdout(v bool) ConfOption
    
    // WithMonitorOutput 监控输出 Logbus, Noop, Prometheus
    func WithMonitorOutput(v MonitorOutput) ConfOption
    
    // WithDefaultPrometheusListenAddress prometheus监控输出端口,k8s集群保持默认9158端口
    func WithDefaultPrometheusListenAddress(v string)
    
    // WithDefaultPrometheusPath prometheus监控输出接口path
    func WithDefaultPrometheusPath(v string) ConfOption
    
    // WithDefaultPercentiles 监控统计耗时的分位值,默认统计耗时的 50%, 75%, 99%, 100% 的分位数
    func WithDefaultPercentiles(v ...float64) ConfOption
    
    // WithDefaultLabel 监控额外添加的全局label,会在监控指标中显示
    func WithDefaultLabel(v prometheus.Labels) ConfOption
    
    // WithMonitorTimingMaxAge monitor.Timing数据的最大生命周期
    func WithMonitorTimingMaxAge(v time.Duration) ConfOption
    
    // WithPrintAsError glog输出field带error时,将日志级别提升到error
    func WithPrintAsError(v bool) ConfOption
    
    // WithWriteSyncer 输出日志的WriteSyncer,默认为os.Stdout
    func WithWriteSyncer(v zapcore.WriteSyncer) ConfOption

    Visit original content creator repository
    https://github.com/sandwich-go/logbus